|
|
@ -95,7 +95,7 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
|
|
|
|
|
|
|
|
|
|
|
List<ProfileFeature> effectiveFeatures = policy.getProfile().getProfileFeaturesList();
|
|
|
|
List<ProfileFeature> effectiveFeatures = policy.getProfile().getProfileFeaturesList();
|
|
|
|
|
|
|
|
|
|
|
|
PolicyOperation policyOperation = new PolicyOperation();
|
|
|
|
ProfileOperation policyOperation = new ProfileOperation();
|
|
|
|
|
|
|
|
|
|
|
|
List<ProfileOperation> profileOperationList = new ArrayList<ProfileOperation>();
|
|
|
|
List<ProfileOperation> profileOperationList = new ArrayList<ProfileOperation>();
|
|
|
|
for (ProfileFeature feature : effectiveFeatures) {
|
|
|
|
for (ProfileFeature feature : effectiveFeatures) {
|
|
|
@ -105,7 +105,7 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
|
|
|
operation.setPayLoad(feature.getContent());
|
|
|
|
operation.setPayLoad(feature.getContent());
|
|
|
|
profileOperationList.add(operation);
|
|
|
|
profileOperationList.add(operation);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
policyOperation.setProfileOperations(profileOperationList);
|
|
|
|
policyOperation.setPayLoad(profileOperationList);
|
|
|
|
policyOperation.setCode(PolicyManagementConstants.POLICY_BUNDLE);
|
|
|
|
policyOperation.setCode(PolicyManagementConstants.POLICY_BUNDLE);
|
|
|
|
|
|
|
|
|
|
|
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<DeviceIdentifier>();
|
|
|
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<DeviceIdentifier>();
|
|
|
@ -140,7 +140,7 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
|
|
|
getEffectiveFeatures(deviceIdentifier);
|
|
|
|
getEffectiveFeatures(deviceIdentifier);
|
|
|
|
|
|
|
|
|
|
|
|
if (!effectiveFeatures.isEmpty()) {
|
|
|
|
if (!effectiveFeatures.isEmpty()) {
|
|
|
|
PolicyOperation policyOperation = new PolicyOperation();
|
|
|
|
ProfileOperation profileOperation = new ProfileOperation();
|
|
|
|
|
|
|
|
|
|
|
|
List<ProfileOperation> profileOperationList = new ArrayList<ProfileOperation>();
|
|
|
|
List<ProfileOperation> profileOperationList = new ArrayList<ProfileOperation>();
|
|
|
|
for (ProfileFeature feature : effectiveFeatures) {
|
|
|
|
for (ProfileFeature feature : effectiveFeatures) {
|
|
|
@ -150,14 +150,14 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
|
|
|
operation.setPayLoad(feature.getContent());
|
|
|
|
operation.setPayLoad(feature.getContent());
|
|
|
|
profileOperationList.add(operation);
|
|
|
|
profileOperationList.add(operation);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
policyOperation.setProfileOperations(profileOperationList);
|
|
|
|
profileOperation.setPayLoad(profileOperationList);
|
|
|
|
policyOperation.setCode(PolicyManagementConstants.POLICY_BUNDLE);
|
|
|
|
profileOperation.setCode(PolicyManagementConstants.POLICY_BUNDLE);
|
|
|
|
|
|
|
|
|
|
|
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<DeviceIdentifier>();
|
|
|
|
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<DeviceIdentifier>();
|
|
|
|
deviceIdentifiers.add(deviceIdentifier);
|
|
|
|
deviceIdentifiers.add(deviceIdentifier);
|
|
|
|
|
|
|
|
|
|
|
|
PolicyManagementDataHolder.getInstance().getDeviceManagementService().
|
|
|
|
PolicyManagementDataHolder.getInstance().getDeviceManagementService().
|
|
|
|
addOperation(policyOperation, deviceIdentifiers);
|
|
|
|
addOperation(profileOperation, deviceIdentifiers);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -200,4 +200,9 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
|
|
|
|
public PolicyEvaluationPoint getPEP() throws PolicyManagementException {
|
|
|
|
public PolicyEvaluationPoint getPEP() throws PolicyManagementException {
|
|
|
|
return PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint();
|
|
|
|
return PolicyManagementDataHolder.getInstance().getPolicyEvaluationPoint();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public int getPolicyCount() throws PolicyManagementException {
|
|
|
|
|
|
|
|
return policyAdministratorPoint.getPolicyCount();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|