Add policy operation for effective policy

revert-70aa11f8
manoj 9 years ago
parent 14c6773b57
commit 8a03c7a368

@ -99,17 +99,22 @@ public class PolicyManagerServiceImpl implements PolicyManagerService {
List<ProfileFeature> effectiveFeatures = policy.getProfile().getProfileFeaturesList(); List<ProfileFeature> effectiveFeatures = policy.getProfile().getProfileFeaturesList();
List<ProfileOperation> profileOperationList = new ArrayList<ProfileOperation>(); List<ProfileOperation> profileOperationList = new ArrayList<ProfileOperation>();
PolicyOperation policyOperation = new PolicyOperation();
for (ProfileFeature feature : effectiveFeatures) { for (ProfileFeature feature : effectiveFeatures) {
ProfileOperation operation = new ProfileOperation(); ProfileOperation profileOperation = new ProfileOperation();
operation.setCode(feature.getFeatureCode()); profileOperation.setCode(feature.getFeatureCode());
operation.setEnabled(true); profileOperation.setEnabled(true);
operation.setStatus(Operation.Status.PENDING); profileOperation.setStatus(Operation.Status.PENDING);
operation.setType(Operation.Type.PROFILE); profileOperation.setType(Operation.Type.PROFILE);
operation.setPayLoad(feature.getContent()); profileOperation.setPayLoad(feature.getContent());
PolicyManagementDataHolder.getInstance().getDeviceManagementService(). profileOperationList.add(profileOperation);
addOperation(operation, deviceIdentifiers);
} }
policyOperation.setProfileOperations(profileOperationList);
PolicyManagementDataHolder.getInstance().getDeviceManagementService().
addOperation(policyOperation, deviceIdentifiers);
} else { } else {
return null; return null;

Loading…
Cancel
Save