Changing getEffectiveFeatures method

revert-70aa11f8
Supun94 8 years ago
parent d82a70f841
commit 89410dfae4

@ -40,7 +40,7 @@ public class MergedEvaluationPoint implements PolicyEvaluationPoint {
private static final String policyEvaluationPoint = "Merged"; private static final String policyEvaluationPoint = "Merged";
@Override @Override
public List<ProfileFeature> getEffectiveFeatures(List<Policy> policyList, DeviceIdentifier deviceIdentifier) public List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier)
throws PolicyEvaluationException { throws PolicyEvaluationException {
return this.getEffectivePolicy(deviceIdentifier).getProfile().getProfileFeaturesList(); return this.getEffectivePolicy(deviceIdentifier).getProfile().getProfileFeaturesList();
} }

@ -41,7 +41,7 @@ public class PolicyEvaluationServiceImpl implements PolicyEvaluationPoint {
} }
@Override @Override
public List<ProfileFeature> getEffectiveFeatures(List<Policy> policyList, DeviceIdentifier deviceIdentifier) public List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier)
throws PolicyEvaluationException { throws PolicyEvaluationException {
List<ProfileFeature> effectiveFeatures = evaluation.getEffectivePolicy(deviceIdentifier). List<ProfileFeature> effectiveFeatures = evaluation.getEffectivePolicy(deviceIdentifier).

@ -43,7 +43,7 @@ public interface PolicyEvaluationPoint {
* @param deviceIdentifier device information. * @param deviceIdentifier device information.
* @return returns the effective feature set. * @return returns the effective feature set.
*/ */
List<ProfileFeature> getEffectiveFeatures(List<Policy> policyList,DeviceIdentifier deviceIdentifier) throws PolicyEvaluationException; List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier) throws PolicyEvaluationException;
/** /**
* This method returns the name of the Policy Evaluation Point * This method returns the name of the Policy Evaluation Point

@ -51,7 +51,7 @@ public interface PolicyManagerService {
Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier) throws PolicyManagementException; Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier) throws PolicyManagementException;
List<ProfileFeature> getEffectiveFeatures(List<Policy> policyList,DeviceIdentifier deviceIdentifier) throws FeatureManagementException; List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier) throws FeatureManagementException;
List<Policy> getPolicies(String deviceType) throws PolicyManagementException; List<Policy> getPolicies(String deviceType) throws PolicyManagementException;

@ -135,12 +135,12 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
} }
@Override @Override
public List<ProfileFeature> getEffectiveFeatures(List<Policy> policyList,DeviceIdentifier deviceIdentifier) throws public List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier) throws
FeatureManagementException { FeatureManagementException {
try { try {
PolicyEvaluationPoint policyEvaluationPoint = PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint(); PolicyEvaluationPoint policyEvaluationPoint = PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint();
if (policyEvaluationPoint != null) { if (policyEvaluationPoint != null) {
return policyEvaluationPoint.getEffectiveFeatures(policyList, deviceIdentifier); return policyEvaluationPoint.getEffectiveFeatures(deviceIdentifier);
} else { } else {
throw new FeatureManagementException("Error occurred while getting the policy evaluation point " + throw new FeatureManagementException("Error occurred while getting the policy evaluation point " +
deviceIdentifier.getId() + " - " + deviceIdentifier.getType()); deviceIdentifier.getId() + " - " + deviceIdentifier.getType());

@ -73,7 +73,7 @@ SimplePolicyEvaluationTest implements PolicyEvaluationPoint {
} }
@Override @Override
public List<ProfileFeature> getEffectiveFeatures(List<Policy> policyList,DeviceIdentifier deviceIdentifier) throws PolicyEvaluationException { public List<ProfileFeature> getEffectiveFeatures(DeviceIdentifier deviceIdentifier) throws PolicyEvaluationException {
return null; return null;
} }

Loading…
Cancel
Save