|
|
@ -345,11 +345,11 @@ public class PolicyManagementServiceImpl implements PolicyManagementService {
|
|
|
|
public Response updatePolicyPriorities(List<PriorityUpdatedPolicyWrapper> priorityUpdatedPolicies) {
|
|
|
|
public Response updatePolicyPriorities(List<PriorityUpdatedPolicyWrapper> priorityUpdatedPolicies) {
|
|
|
|
PolicyManagerService policyManagementService = DeviceMgtAPIUtils.getPolicyManagementService();
|
|
|
|
PolicyManagerService policyManagementService = DeviceMgtAPIUtils.getPolicyManagementService();
|
|
|
|
List<Policy> policiesToUpdate = new ArrayList<>(priorityUpdatedPolicies.size());
|
|
|
|
List<Policy> policiesToUpdate = new ArrayList<>(priorityUpdatedPolicies.size());
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < priorityUpdatedPolicies.size(); i++) {
|
|
|
|
for (PriorityUpdatedPolicyWrapper priorityUpdatedPolicy : priorityUpdatedPolicies) {
|
|
|
|
Policy policyObj = new Policy();
|
|
|
|
Policy policyObj = new Policy();
|
|
|
|
policyObj.setId(priorityUpdatedPolicies.get(i).getId());
|
|
|
|
policyObj.setId(priorityUpdatedPolicy.getId());
|
|
|
|
policyObj.setPriorityId(priorityUpdatedPolicies.get(i).getPriority());
|
|
|
|
policyObj.setPriorityId(priorityUpdatedPolicy.getPriority());
|
|
|
|
policiesToUpdate.add(policyObj);
|
|
|
|
policiesToUpdate.add(policyObj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
boolean policiesUpdated;
|
|
|
|
boolean policiesUpdated;
|
|
|
|