Merge "JUnit workaround for PAP-REST, sonar bug"
[policy/engine.git] / PolicyEngineAPI / src / main / java / org / onap / policy / api / PolicyEngine.java
index bfb4f1e..b8b077c 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * PolicyEngineAPI
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ package org.onap.policy.api;
 
 import java.util.Collection;
 import java.util.Map;
+import java.util.Properties;
 import java.util.UUID;
 
 import javax.json.JsonObject;
@@ -36,34 +37,52 @@ import org.onap.policy.std.StdPolicyEngine;
  * @version 2.0
  */
 public class PolicyEngine{
-       private String propertyFilePath = null;
-       private StdPolicyEngine stdPolicyEngine;
+       private final StdPolicyEngine stdPolicyEngine;
        private NotificationScheme scheme = null;
        private NotificationHandler handler = null;
        
+        /**
+   * PolicyEngine Constructor with <code>Properties</code> structure
+   * 
+   * @param properties the <code>Properties</code> structure containing the Policy engine parameters 
+   * @throws PolicyEngineException PolicyEngine Exception
+   */
+  public PolicyEngine(final Properties properties) throws PolicyEngineException {
+    this.stdPolicyEngine= new StdPolicyEngine(properties, (String)null);
+  }
+       
        /**
         * PolicyEngine Constructor with <code>String</code> format of propertiesFilePathname
         * 
         * @param propertiesFilePathname the <code>String</code> format of the propertiesFilePathname 
         * @throws PolicyEngineException PolicyEngine Exception
         */
-       public PolicyEngine(String propertiesFilePathname) throws PolicyEngineException {
-               this.propertyFilePath = propertiesFilePathname ; 
-               this.stdPolicyEngine= new StdPolicyEngine(this.propertyFilePath, (String)null);
+       public PolicyEngine(final String propertiesFilePathname) throws PolicyEngineException {
+               this.stdPolicyEngine= new StdPolicyEngine(propertiesFilePathname, (String)null);
        }
        
        /**
-        * PolicyEngine Constructor with <code>String</code> format of propertiesFilePathname
+        * PolicyEngine Constructor with <code>Properties</code> structure
         * 
-        * @param propertiesFilePathname the <code>String</code> format of the propertiesFilePathname
+        * @param properties the <code>Properties</code> structure containing the Policy engine parameters 
         * @param clientKey depicts String format of Password/ Client_Key.  
         * @throws PolicyEngineException PolicyEngine Exception
         */
-       public PolicyEngine(String propertiesFilePathname, String clientKey) throws PolicyEngineException {
-               this.propertyFilePath = propertiesFilePathname ; 
-               this.stdPolicyEngine= new StdPolicyEngine(this.propertyFilePath, clientKey);
+       public PolicyEngine(final Properties properties, final String clientKey) throws PolicyEngineException {
+               this.stdPolicyEngine= new StdPolicyEngine(properties, clientKey);
        }
        
+        /**
+   * PolicyEngine Constructor with <code>String</code> format of propertiesFilePathname
+   * 
+   * @param propertiesFilePathname the <code>String</code> format of the propertiesFilePathname
+   * @param clientKey depicts String format of Password/ Client_Key.  
+   * @throws PolicyEngineException PolicyEngine Exception
+   */
+  public PolicyEngine(final String propertiesFilePathname, final String clientKey) throws PolicyEngineException {
+    this.stdPolicyEngine= new StdPolicyEngine(propertiesFilePathname, clientKey);
+  }
+       
        /**
         * PolicyEngine Constructor with <code>String</code> format of PropertiesFilePathname and <code>NotificationScheme</code>
         * 
@@ -71,10 +90,9 @@ public class PolicyEngine{
         * @param scheme the <code>NotificationScheme</code> of {@link org.onap.policy.api.NotificationScheme} which defines the Notification Scheme
         * @throws PolicyEngineException PolicyEngine Exception
         */
-       public PolicyEngine(String propertiesFilePathname, NotificationScheme scheme) throws PolicyEngineException{
-               this.propertyFilePath = propertiesFilePathname;
+       public PolicyEngine(final String propertiesFilePathname, final NotificationScheme scheme) throws PolicyEngineException{
                this.scheme = scheme;
-               this.stdPolicyEngine = new StdPolicyEngine(this.propertyFilePath, this.scheme);
+               this.stdPolicyEngine = new StdPolicyEngine(propertiesFilePathname, this.scheme);
        }
        
        /**
@@ -85,11 +103,10 @@ public class PolicyEngine{
         *  @param handler the <code>NotificationHandler</code> of {@link org.onap.policy.api.NotificationHandler} which defines what should happen when a notification is received.
         *  @throws PolicyEngineException PolicyEngine Exception
         */
-       public PolicyEngine(String propertiesFilePathname, NotificationScheme scheme, NotificationHandler handler) throws PolicyEngineException {
-               this.propertyFilePath = propertiesFilePathname ;
+       public PolicyEngine(final String propertiesFilePathname, final NotificationScheme scheme, final NotificationHandler handler) throws PolicyEngineException {
                this.scheme = scheme;
                this.handler = handler;
-               this.stdPolicyEngine= new StdPolicyEngine(this.propertyFilePath,this.scheme,this.handler);
+               this.stdPolicyEngine= new StdPolicyEngine(propertiesFilePathname,this.scheme,this.handler);
        }
        
        /**
@@ -101,7 +118,7 @@ public class PolicyEngine{
         * @deprecated use {@link #getConfig(ConfigRequestParameters configRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfigByPolicyName(String policyName) throws PolicyConfigException {
+       public Collection<PolicyConfig> getConfigByPolicyName(final String policyName) throws PolicyConfigException {
                return getConfig(setConfigRequestParameters(policyName, null, null, null, null));
        }
        
@@ -116,27 +133,27 @@ public class PolicyEngine{
         * @deprecated use {@link #getConfig(ConfigRequestParameters configRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfigByPolicyName(String policyName, UUID requestID) throws PolicyConfigException {
+       public Collection<PolicyConfig> getConfigByPolicyName(final String policyName, final UUID requestID) throws PolicyConfigException {
                return getConfig(setConfigRequestParameters(policyName, null, null, null, requestID));  
        }
        
        /**
-        * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the onapComponentName 
+        * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the onapName 
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose configuration is required. 
+        * @param onapName the <code>String</code> format of the onapName whose configuration is required. 
         * @return <code>Collection</code> of {@link org.onap.policy.api.PolicyConfig} which has the configuration.
         * @throws PolicyConfigException PolicyConfig Exception
         * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfig(String onapComponentName) throws PolicyConfigException {
-               return getConfig(setConfigRequestParameters(null, onapComponentName, null, null, null));
+       public Collection<PolicyConfig> getConfig(final String onapName) throws PolicyConfigException {
+               return getConfig(setConfigRequestParameters(null, onapName, null, null, null));
        }
        
        /**
-        * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the onapComponentName 
+        * Gets the configuration from the PolicyDecisionPoint(PDP) for the <code>String</code> which represents the onapName 
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose configuration is required. 
+        * @param onapName the <code>String</code> format of the onapName whose configuration is required. 
         * @return <code>Collection</code> of {@link org.onap.policy.api.PolicyConfig} which has the configuration.
         * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
         * A different request ID should be passed for each request.
@@ -144,32 +161,32 @@ public class PolicyEngine{
         * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfig(String onapComponentName, UUID requestID) throws PolicyConfigException {
-               return getConfig(setConfigRequestParameters(null, onapComponentName, null, null, requestID));
+       public Collection<PolicyConfig> getConfig(final String onapName, final UUID requestID) throws PolicyConfigException {
+               return getConfig(setConfigRequestParameters(null, onapName, null, null, requestID));
        }
        
        /**
-        * Requests the configuration of the <code>String</code> which represents the onapComponentName and <code>String</code>
+        * Requests the configuration of the <code>String</code> which represents the onapName and <code>String</code>
         * which represents the configName and returns the configuration if different Configurations exist for the
-        * particular onapComponentName.  
+        * particular onapName.  
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose configuration is required.
+        * @param onapName the <code>String</code> format of the onapName whose configuration is required.
         * @param configName the <code>String</code> format of the configurationName whose configuration is required.
         * @return <code>Collection</code> of {@link org.onap.policy.api.PolicyConfig} which has the configuration. 
         * @throws PolicyConfigException PolicyConfig Exception
         * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfig(String onapComponentName, String configName) throws PolicyConfigException {
-               return getConfig(setConfigRequestParameters(null, onapComponentName, configName, null, null));
+       public Collection<PolicyConfig> getConfig(final String onapName, final String configName) throws PolicyConfigException {
+               return getConfig(setConfigRequestParameters(null, onapName, configName, null, null));
        }
        
        /**
-        * Requests the configuration of the <code>String</code> which represents the onapComponentName and <code>String</code>
+        * Requests the configuration of the <code>String</code> which represents the onapName and <code>String</code>
         * which represents the configName and returns the configuration if different Configurations exist for the
-        * particular onapComponentName.  
+        * particular onapName.  
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose configuration is required.
+        * @param onapName the <code>String</code> format of the onapName whose configuration is required.
         * @param configName the <code>String</code> format of the configurationName whose configuration is required.
         * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
         * A different request ID should be passed for each request.
@@ -178,16 +195,16 @@ public class PolicyEngine{
         * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfig(String onapComponentName, String configName, UUID requestID) throws PolicyConfigException {
-               return getConfig(setConfigRequestParameters(null, onapComponentName, configName, null, requestID));
+       public Collection<PolicyConfig> getConfig(final String onapName, final String configName, final UUID requestID) throws PolicyConfigException {
+               return getConfig(setConfigRequestParameters(null, onapName, configName, null, requestID));
        }
        
        /**
-        * Requests the configuration of the <code>String</code> which represents the onapComponentName, <code>String</code>
+        * Requests the configuration of the <code>String</code> which represents the onapName, <code>String</code>
         * which represents the configName and <code>Map</code> of <code>String,String</code> which has the configAttribute and returns the specific 
         * configuration related to the configAttributes mentioned.
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose configuration is required.
+        * @param onapName the <code>String</code> format of the onapName whose configuration is required.
         * @param configName the <code>String</code> format of the configurationName whose configuration is required.
         * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
         * @return <code>Collection</code> of {@link org.onap.policy.api.PolicyConfig} which has the configuration.
@@ -195,16 +212,16 @@ public class PolicyEngine{
         * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfig(String onapComponentName, String configName, Map<String, String> configAttributes) throws PolicyConfigException{
-               return getConfig(setConfigRequestParameters(null, onapComponentName, configName, configAttributes, null));
+       public Collection<PolicyConfig> getConfig(final String onapName, final String configName, final Map<String, String> configAttributes) throws PolicyConfigException{
+               return getConfig(setConfigRequestParameters(null, onapName, configName, configAttributes, null));
        }
        
        /**
-        * Requests the configuration of the <code>String</code> which represents the onapComponentName, <code>String</code>
+        * Requests the configuration of the <code>String</code> which represents the onapName, <code>String</code>
         * which represents the configName and <code>Map</code> of <code>String,String</code> which has the configAttribute and returns the specific 
         * configuration related to the configAttributes mentioned.
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose configuration is required.
+        * @param onapName the <code>String</code> format of the onapName whose configuration is required.
         * @param configName the <code>String</code> format of the configurationName whose configuration is required.
         * @param configAttributes the <code>Map</code> of <code>String,String</code> format of the configuration attributes which are required.
         * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
@@ -214,8 +231,8 @@ public class PolicyEngine{
         * @deprecated use {@link #getConfig(ConfigRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyConfig> getConfig(String onapComponentName, String configName, Map<String, String> configAttributes, UUID requestID) throws PolicyConfigException{
-               return getConfig(setConfigRequestParameters(null, onapComponentName, configName, configAttributes, requestID));
+       public Collection<PolicyConfig> getConfig(final String onapName, final String configName, final Map<String, String> configAttributes, final UUID requestID) throws PolicyConfigException{
+               return getConfig(setConfigRequestParameters(null, onapName, configName, configAttributes, requestID));
        }
        
        /**
@@ -226,7 +243,7 @@ public class PolicyEngine{
         * @return <code>Collection</code> of {@link org.onap.policy.api.PolicyConfig} which has the configuration.
         * @throws PolicyConfigException PolicyConfig Exception
         */
-       public Collection<PolicyConfig> getConfig(ConfigRequestParameters configRequestParameters)  throws PolicyConfigException{
+       public Collection<PolicyConfig> getConfig(final ConfigRequestParameters configRequestParameters)  throws PolicyConfigException{
                return stdPolicyEngine.getConfig(configRequestParameters);
        }
        
@@ -238,7 +255,7 @@ public class PolicyEngine{
         * @return <code>Collection</code> of <code>String</code> which returns the list of policies.
         * @throws PolicyConfigException PolicyConfig Exception
         */
-       public Collection<String> listConfig(ConfigRequestParameters listPolicyRequestParameters)  throws PolicyConfigException{
+       public Collection<String> listConfig(final ConfigRequestParameters listPolicyRequestParameters)  throws PolicyConfigException{
                return stdPolicyEngine.listConfig(listPolicyRequestParameters);
        }
        
@@ -252,7 +269,7 @@ public class PolicyEngine{
         * @deprecated use {@link #sendEvent(EventRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyResponse> sendEvent(Map<String, String> eventAttributes) throws PolicyEventException {
+       public Collection<PolicyResponse> sendEvent(final Map<String, String> eventAttributes) throws PolicyEventException {
                return stdPolicyEngine.sendEvent(eventAttributes, (UUID) null);
        }
        
@@ -267,7 +284,7 @@ public class PolicyEngine{
         * @deprecated use {@link #sendEvent(EventRequestParameters)} Instead.
         */
        @Deprecated
-       public Collection<PolicyResponse> sendEvent(Map<String, String> eventAttributes, UUID requestID) throws PolicyEventException {
+       public Collection<PolicyResponse> sendEvent(final Map<String, String> eventAttributes, final UUID requestID) throws PolicyEventException {
                return stdPolicyEngine.sendEvent(eventAttributes, requestID);
        }
        
@@ -278,28 +295,28 @@ public class PolicyEngine{
         * @return <code>Collection</code> of {@link org.onap.policy.api.PolicyResponse} which has the Response.
         * @throws PolicyEventException PolicyEvent Exception
         */
-       public Collection<PolicyResponse> sendEvent(EventRequestParameters eventRequestParameters) throws PolicyEventException {
+       public Collection<PolicyResponse> sendEvent(final EventRequestParameters eventRequestParameters) throws PolicyEventException {
                return stdPolicyEngine.sendEvent(eventRequestParameters);
        }
        
        /**
         * Sends the decision Attributes specified to the PEP and returns back the PolicyDecision. 
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose Decision is required.
+        * @param onapName the <code>String</code> format of the onapName whose Decision is required.
         * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that must contain the ID and values.
         * @return {@link org.onap.policy.api.DecisionResponse} which has the Decision. 
         * @throws PolicyDecisionException PolicyDecision Exception
         * @deprecated use {@link #getDecision(DecisionRequestParameters)} Instead.
         */
        @Deprecated
-       public DecisionResponse getDecision(String onapComponentName, Map<String,String> decisionAttributes) throws PolicyDecisionException {
-               return stdPolicyEngine.getDecision(onapComponentName, decisionAttributes, null);
+       public DecisionResponse getDecision(final String onapName, final Map<String,String> decisionAttributes) throws PolicyDecisionException {
+               return stdPolicyEngine.getDecision(onapName, decisionAttributes, null);
        }
        
        /**
         * Sends the decision Attributes specified to the PEP and returns back the PolicyDecision. 
         * 
-        * @param onapComponentName the <code>String</code> format of the onapComponentName whose Decision is required.
+        * @param onapName the <code>String</code> format of the onapName whose Decision is required.
         * @param decisionAttributes the <code>Map</code> of <code>String,String</code> format of the decisionAttributes that must contain the ID and values.
         * @param requestID unique request ID which will be passed throughout the ONAP components to correlate logging messages.
         * A different request ID should be passed for each request.
@@ -308,8 +325,8 @@ public class PolicyEngine{
         * @deprecated use {@link #getDecision(DecisionRequestParameters)} Instead.
         */
        @Deprecated
-       public DecisionResponse getDecision(String onapComponentName, Map<String,String> decisionAttributes, UUID requestID) throws PolicyDecisionException {
-               return stdPolicyEngine.getDecision(onapComponentName, decisionAttributes, requestID);
+       public DecisionResponse getDecision(final String onapName, final Map<String,String> decisionAttributes, final UUID requestID) throws PolicyDecisionException {
+               return stdPolicyEngine.getDecision(onapName, decisionAttributes, requestID);
        }
        
        /**
@@ -319,7 +336,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.DecisionResponse} which has the Decision.
         * @throws PolicyDecisionException PolicyDecision Exception
         */
-       public DecisionResponse getDecision(DecisionRequestParameters decisionRequestParameters) throws PolicyDecisionException {
+       public DecisionResponse getDecision(final DecisionRequestParameters decisionRequestParameters) throws PolicyDecisionException {
                return stdPolicyEngine.getDecision(decisionRequestParameters);
        }
        
@@ -331,7 +348,7 @@ public class PolicyEngine{
         * @throws PolicyException PolicyException related to the operation      
         * 
         * */
-       public MetricsResponse getMetrics(MetricsRequestParameters parameters) throws PolicyException {
+       public MetricsResponse getMetrics(final MetricsRequestParameters parameters) throws PolicyException {
                return stdPolicyEngine.getMetrics(parameters);
        }
        
@@ -356,9 +373,9 @@ public class PolicyEngine{
         * @deprecated use {@link #createPolicy(PolicyParameters)} Instead.
         */
        @Deprecated
-       public String createConfigPolicy(String policyName, String policyDescription, String onapName, String configName, 
-                                                                                               Map<String, String> configAttributes, String configType, String body, String policyScope, UUID requestID,
-                                                                                               String riskLevel, String riskType, String guard, String ttlDate) throws PolicyException {
+       public String createConfigPolicy(final String policyName, final String policyDescription, final String onapName, final String configName, 
+                                                                                               final Map<String, String> configAttributes, final String configType, final String body, final String policyScope, final UUID requestID,
+                                                                                               final String riskLevel, final String riskType, final String guard, final String ttlDate) throws PolicyException {
                return stdPolicyEngine.createUpdateConfigPolicy(policyName, policyDescription, onapName, configName, 
                                configAttributes, configType, body, policyScope, requestID,
                                riskLevel, riskType, guard, ttlDate, false);
@@ -385,9 +402,9 @@ public class PolicyEngine{
         * @deprecated use {@link #updatePolicy(PolicyParameters)} Instead.
         */
        @Deprecated
-       public String updateConfigPolicy(String policyName, String policyDescription, String onapName, String configName, 
-                                                                                               Map<String, String> configAttributes, String configType, String body, String policyScope, UUID requestID,
-                                                                                               String riskLevel, String riskType, String guard, String ttlDate) throws PolicyException {
+       public String updateConfigPolicy(final String policyName, final String policyDescription, final String onapName, final String configName, 
+                                                                                               final Map<String, String> configAttributes, final String configType, final String body, final String policyScope, final UUID requestID,
+                                                                                               final String riskLevel, final String riskType, final String guard, final String ttlDate) throws PolicyException {
                return stdPolicyEngine.createUpdateConfigPolicy(policyName, policyDescription, onapName, configName, 
                                configAttributes, configType, body, policyScope, requestID,riskLevel, riskType, guard, ttlDate, true);
        }
@@ -408,8 +425,8 @@ public class PolicyEngine{
         * @deprecated use {@link #createPolicy(PolicyParameters)} Instead.
         */
        @Deprecated
-       public String createConfigFirewallPolicy(String policyName, JsonObject firewallJson, String policyScope, UUID requestID,
-                       String riskLevel, String riskType, String guard, String ttlDate) throws PolicyException {
+       public String createConfigFirewallPolicy(final String policyName, final JsonObject firewallJson, final String policyScope, final UUID requestID,
+                       final String riskLevel, final String riskType, final String guard, final String ttlDate) throws PolicyException {
                return stdPolicyEngine.createUpdateConfigFirewallPolicy(policyName, firewallJson, policyScope, requestID,riskLevel, 
                                riskType, guard, ttlDate, false);
        }
@@ -430,8 +447,8 @@ public class PolicyEngine{
         * @deprecated use {@link #updatePolicy(PolicyParameters)} Instead.
         */
        @Deprecated
-       public String updateConfigFirewallPolicy(String policyName, JsonObject firewallJson, String policyScope, UUID requestID,
-                       String riskLevel, String riskType, String guard, String ttlDate) throws PolicyException {
+       public String updateConfigFirewallPolicy(final String policyName, final JsonObject firewallJson, final String policyScope, final UUID requestID,
+                       final String riskLevel, final String riskType, final String guard, final String ttlDate) throws PolicyException {
                return stdPolicyEngine.createUpdateConfigFirewallPolicy(policyName, firewallJson, policyScope, requestID,riskLevel, riskType, guard, ttlDate, true);
        }
        
@@ -443,7 +460,7 @@ public class PolicyEngine{
         * @throws PolicyException PolicyException related to the operation      
         * 
         * */
-       public DictionaryResponse getDictionaryItem(DictionaryParameters parameters) throws PolicyException {
+       public DictionaryResponse getDictionaryItem(final DictionaryParameters parameters) throws PolicyException {
                return stdPolicyEngine.getDictionaryItem(parameters);
        }
        
@@ -454,7 +471,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to create dictionary item Request. 
         * @throws PolicyException  PolicyException related to the operation. 
         */
-       public PolicyChangeResponse createDictionaryItem(DictionaryParameters parameters) throws PolicyException {
+       public PolicyChangeResponse createDictionaryItem(final DictionaryParameters parameters) throws PolicyException {
                return stdPolicyEngine.createDictionaryItem(parameters);
        }
        
@@ -465,7 +482,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to update dictionary item Request. 
         * @throws PolicyException PolicyException related to the operation. 
         */
-       public PolicyChangeResponse updateDictionaryItem(DictionaryParameters parameters) throws PolicyException {
+       public PolicyChangeResponse updateDictionaryItem(final DictionaryParameters parameters) throws PolicyException {
                return stdPolicyEngine.updateDictionaryItem(parameters);
        }
        
@@ -476,7 +493,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to create policy Request. 
         * @throws PolicyException  PolicyException related to the operation. 
         */
-       public PolicyChangeResponse createPolicy(PolicyParameters policyParameters) throws PolicyException {
+       public PolicyChangeResponse createPolicy(final PolicyParameters policyParameters) throws PolicyException {
                return stdPolicyEngine.createPolicy(policyParameters);
        }
        
@@ -487,7 +504,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to create policy Request. 
         * @throws PolicyException  PolicyException related to the operation. 
         */
-       public PolicyChangeResponse updatePolicy(PolicyParameters policyParameters) throws PolicyException {
+       public PolicyChangeResponse updatePolicy(final PolicyParameters policyParameters) throws PolicyException {
                return stdPolicyEngine.updatePolicy(policyParameters);
        }
        
@@ -504,7 +521,7 @@ public class PolicyEngine{
         * @deprecated use {@link #pushPolicy(PushPolicyParameters)} instead. 
         */
        @Deprecated
-       public String pushPolicy(String policyScope, String policyName, String policyType, String pdpGroup, UUID requestID) throws PolicyException {
+       public String pushPolicy(final String policyScope, final String policyName, final String policyType, final String pdpGroup, final UUID requestID) throws PolicyException {
                return stdPolicyEngine.pushPolicy(policyScope, policyName, policyType, pdpGroup, requestID);
        }
        
@@ -515,7 +532,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to the push Policy Request. 
         * @throws PolicyException  PolicyException related to the operation. 
         */
-       public PolicyChangeResponse pushPolicy(PushPolicyParameters pushPolicyParameters) throws PolicyException {
+       public PolicyChangeResponse pushPolicy(final PushPolicyParameters pushPolicyParameters) throws PolicyException {
                return stdPolicyEngine.pushPolicy(pushPolicyParameters);
        }
        
@@ -526,7 +543,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to the Delete Policy Request.
         * @throws PolicyException PolicyException related to the operation. 
         */
-       public PolicyChangeResponse deletePolicy(DeletePolicyParameters deletePolicyParameters) throws PolicyException {
+       public PolicyChangeResponse deletePolicy(final DeletePolicyParameters deletePolicyParameters) throws PolicyException {
                return stdPolicyEngine.deletePolicy(deletePolicyParameters);
        }
        
@@ -537,7 +554,7 @@ public class PolicyEngine{
         * @return {@link org.onap.policy.api.PolicyChangeResponse} which consists of the response related to create import Service. 
         * @throws PolicyException PolicyException related to the operation. 
         */
-       public PolicyChangeResponse policyEngineImport(ImportParameters importParameters) throws PolicyException {
+       public PolicyChangeResponse policyEngineImport(final ImportParameters importParameters) throws PolicyException {
                return stdPolicyEngine.policyEngineImport(importParameters);
        }
        
@@ -547,7 +564,7 @@ public class PolicyEngine{
         * @param scheme the <code>NotificationScheme</code> of {@link org.onap.policy.api.NotificationScheme} which defines the Notification Scheme
         * @param handler the <code>NotificationHandler</code> of {@link org.onap.policy.api.NotificationHandler} which defines what should happen when a notification is received.
         */
-       public void setNotification(NotificationScheme scheme, NotificationHandler handler) {
+       public void setNotification(final NotificationScheme scheme, final NotificationHandler handler) {
                this.scheme = scheme;
                this.handler = handler;
                stdPolicyEngine.notification(this.scheme,this.handler);
@@ -565,7 +582,7 @@ public class PolicyEngine{
         * 
         * @param scheme the <code>NotificationScheme</code> of {@link org.onap.policy.api.NotificationScheme} which defines the Notification Scheme
         */
-       public void setScheme(NotificationScheme scheme){
+       public void setScheme(final NotificationScheme scheme){
                this.scheme = scheme;
                stdPolicyEngine.setScheme(this.scheme);
        }
@@ -585,15 +602,15 @@ public class PolicyEngine{
         *   
         * @param clientKey depicts String format of Password/ Client_Key.  
         */
-       public void setClientKey(String clientKey){
-               stdPolicyEngine.setClientKey(clientKey);
+       public void setClientKey(final String clientKey){
+               StdPolicyEngine.setClientKey(clientKey);
        }
        
        // Internal Setter Method to help build configRequestParameters.
-       private ConfigRequestParameters setConfigRequestParameters(String policyName, String onapComponentName, String configName, Map<String, String> configAttributes, UUID requestID){
-               ConfigRequestParameters configRequestParameters = new ConfigRequestParameters();
+       private ConfigRequestParameters setConfigRequestParameters(final String policyName, final String onapName, final String configName, final Map<String, String> configAttributes, final UUID requestID){
+               final ConfigRequestParameters configRequestParameters = new ConfigRequestParameters();
                configRequestParameters.setPolicyName(policyName);
-               configRequestParameters.setOnapName(onapComponentName);
+               configRequestParameters.setOnapName(onapName);
                configRequestParameters.setConfigName(configName);
                configRequestParameters.setConfigAttributes(configAttributes);
                configRequestParameters.setRequestID(requestID);