mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add policy operation for effective policy
This commit is contained in:
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>();
|
||||||
for (ProfileFeature feature : effectiveFeatures) {
|
|
||||||
ProfileOperation operation = new ProfileOperation();
|
|
||||||
|
|
||||||
operation.setCode(feature.getFeatureCode());
|
PolicyOperation policyOperation = new PolicyOperation();
|
||||||
operation.setEnabled(true);
|
|
||||||
operation.setStatus(Operation.Status.PENDING);
|
for (ProfileFeature feature : effectiveFeatures) {
|
||||||
operation.setType(Operation.Type.PROFILE);
|
ProfileOperation profileOperation = new ProfileOperation();
|
||||||
operation.setPayLoad(feature.getContent());
|
|
||||||
PolicyManagementDataHolder.getInstance().getDeviceManagementService().
|
profileOperation.setCode(feature.getFeatureCode());
|
||||||
addOperation(operation, deviceIdentifiers);
|
profileOperation.setEnabled(true);
|
||||||
|
profileOperation.setStatus(Operation.Status.PENDING);
|
||||||
|
profileOperation.setType(Operation.Type.PROFILE);
|
||||||
|
profileOperation.setPayLoad(feature.getContent());
|
||||||
|
profileOperationList.add(profileOperation);
|
||||||
}
|
}
|
||||||
|
policyOperation.setProfileOperations(profileOperationList);
|
||||||
|
PolicyManagementDataHolder.getInstance().getDeviceManagementService().
|
||||||
|
addOperation(policyOperation, deviceIdentifiers);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user