summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java
diff options
context:
space:
mode:
Diffstat (limited to 'POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java')
-rw-r--r--POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java b/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java
index 8751d735c..17e8f89f2 100644
--- a/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java
+++ b/POLICY-SDK-APP/src/main/java/org/openecomp/policy/controller/AutoPushController.java
@@ -108,11 +108,11 @@ public class AutoPushController extends RestrictedBaseController{
List<String> roles = null;
data = new ArrayList<Object>();
String userId = UserUtils.getUserSession(request).getOrgUserId();
- Map<String, Object> model = new HashMap<String, Object>();
+ Map<String, Object> model = new HashMap<>();
ObjectMapper mapper = new ObjectMapper();
List<Object> userRoles = PolicyController.getRoles(userId);
- roles = new ArrayList<String>();
- scopes = new HashSet<String>();
+ roles = new ArrayList<>();
+ scopes = new HashSet<>();
for(Object role: userRoles){
Roles userRole = (Roles) role;
roles.add(userRole.getRole());
@@ -161,8 +161,8 @@ public class AutoPushController extends RestrictedBaseController{
@RequestMapping(value={"/auto_Push/PushPolicyToPDP.htm"}, method={org.springframework.web.bind.annotation.RequestMethod.POST})
public ModelAndView PushPolicyToPDPGroup(HttpServletRequest request, HttpServletResponse response) throws Exception {
try {
- ArrayList<Object> selectedPDPS = new ArrayList<Object>();
- ArrayList<String> selectedPoliciesInUI = new ArrayList<String>();
+ ArrayList<Object> selectedPDPS = new ArrayList<>();
+ ArrayList<String> selectedPoliciesInUI = new ArrayList<>();
this.groups.addAll(PolicyController.getPapEngine().getEcompPDPGroups());
ObjectMapper mapper = new ObjectMapper();
this.container = new PDPGroupContainer(PolicyController.getPapEngine());
@@ -185,8 +185,8 @@ public class AutoPushController extends RestrictedBaseController{
}
for (Object pdpDestinationGroupId : selectedPDPS) {
- Set<PDPPolicy> currentPoliciesInGroup = new HashSet<PDPPolicy>();
- Set<PDPPolicy> selectedPolicies = new HashSet<PDPPolicy>();
+ Set<PDPPolicy> currentPoliciesInGroup = new HashSet<>();
+ Set<PDPPolicy> selectedPolicies = new HashSet<>();
for (String policyId : selectedPoliciesInUI) {
logger.debug("Handlepolicies..." + pdpDestinationGroupId + policyId);
@@ -329,7 +329,7 @@ public class AutoPushController extends RestrictedBaseController{
String data = removePolicyData.get(i).toString();
AutoPushController.policyContainer.removeItem(data);
}
- Set<PDPPolicy> changedPolicies = new HashSet<PDPPolicy>();
+ Set<PDPPolicy> changedPolicies = new HashSet<>();
changedPolicies.addAll((Collection<PDPPolicy>) AutoPushController.policyContainer.getItemIds());
StdPDPGroup updatedGroupObject = new StdPDPGroup(group.getId(), group.isDefaultGroup(), group.getName(), group.getDescription(),null);
updatedGroupObject.setPolicies(changedPolicies);