[Policy-52, Policy-92, Policy-93] Policy Enhancements and bugfixes
[policy/engine.git] / POLICY-SDK-APP / src / main / java / org / openecomp / policy / controller / ActionPolicyController.java
index 2e555f2..c88412b 100644 (file)
@@ -58,17 +58,19 @@ import org.openecomp.policy.common.logging.flexlogger.Logger;
 public class ActionPolicyController extends RestrictedBaseController{
        private static final Logger LOGGER = FlexLogger.getLogger(ActionPolicyController.class);
        
-       public ActionPolicyController(){}
+       public ActionPolicyController(){
+               //Default Constructor
+       }
 
        private ArrayList<Object> attributeList;
        protected  LinkedList<Integer> ruleAlgoirthmTracker;
        public static final String PERFORMER_ATTRIBUTEID = "performer";
-       protected  Map<String, String> performer = new HashMap<String, String>();
+       protected  Map<String, String> performer = new HashMap<>();
        private  ArrayList<Object>  ruleAlgorithmList;
 
        public void prePopulateActionPolicyData(PolicyRestAdapter policyAdapter, PolicyEntity entity) {
-               attributeList = new ArrayList<Object>();
-               ruleAlgorithmList = new ArrayList<Object>();
+               attributeList = new ArrayList<>();
+               ruleAlgorithmList = new ArrayList<>();
                performer.put("PDP", "PDPAction");
                performer.put("PEP", "PEPAction");
 
@@ -115,8 +117,8 @@ public class ActionPolicyController extends RestrictedBaseController{
                                                                                AttributeDesignatorType designator = match.getAttributeDesignator();
                                                                                String attributeId = designator.getAttributeId();
                                                                                // Component attributes are saved under Target here we are fetching them back.
-                                                                               // One row is default so we are not adding dynamic componet at index 0.
-                                                                               Map<String, String> attribute = new HashMap<String, String>();
+                                                                               // One row is default so we are not adding dynamic component at index 0.
+                                                                               Map<String, String> attribute = new HashMap<>();
                                                                                attribute.put("key", attributeId);
                                                                                attribute.put("value", value);
                                                                                attributeList.add(attribute);   
@@ -137,7 +139,7 @@ public class ActionPolicyController extends RestrictedBaseController{
                                                if (condition != null) {
                                                        int index = 0;
                                                        ApplyType actionApply = (ApplyType) condition.getExpression().getValue();
-                                                       ruleAlgoirthmTracker = new LinkedList<Integer>();
+                                                       ruleAlgoirthmTracker = new LinkedList<>();
                                                        // Populating Rule Algorithms starting from compound.
                                                        prePopulateCompoundRuleAlgorithm(index, actionApply);
                                                }