|
|
@ -91,12 +91,19 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier) throws PolicyManagementException {
|
|
|
|
public Policy getEffectivePolicy(DeviceIdentifier deviceIdentifier) throws PolicyManagementException {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Policy policy = PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint().
|
|
|
|
PolicyEvaluationPoint policyEvaluationPoint = PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint();
|
|
|
|
getEffectivePolicy(deviceIdentifier);
|
|
|
|
Policy policy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (policyEvaluationPoint != null) {
|
|
|
|
|
|
|
|
policy = policyEvaluationPoint.
|
|
|
|
|
|
|
|
getEffectivePolicy(deviceIdentifier);
|
|
|
|
if (policy == null) {
|
|
|
|
if (policy == null) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
throw new PolicyEvaluationException("Error occurred while getting the policy evaluation point " +
|
|
|
|
|
|
|
|
deviceIdentifier.getId() + " - " + deviceIdentifier.getType());
|
|
|
|
|
|
|
|
}
|
|
|
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<DeviceIdentifier>();
|
|
|
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<DeviceIdentifier>();
|
|
|
|
deviceIdentifiers.add(deviceIdentifier);
|
|
|
|
deviceIdentifiers.add(deviceIdentifier);
|
|
|
|
|
|
|
|
|
|
|
|