diff options
Diffstat (limited to 'PolicyEngineAPI')
11 files changed, 14 insertions, 3 deletions
diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/AttributeType.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/AttributeType.java index 8cfa51212..0a4621902 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/AttributeType.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/AttributeType.java @@ -62,6 +62,7 @@ public enum AttributeType { * Returns the <code>String</code> format of Type for this <code>AttributeType</code> * @return the <code>String</code> of the Type for this <code>AttributeType</code> */ + @Override public String toString() { return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/DeletePolicyCondition.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/DeletePolicyCondition.java index 4001d3fa6..117ac716e 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/DeletePolicyCondition.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/DeletePolicyCondition.java @@ -49,6 +49,7 @@ public enum DeletePolicyCondition { * Returns the <code>String</code> format of delete condition for this Policy * @return the <code>String</code> of the delete condition for this Policy */ + @Override public String toString(){ return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryType.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryType.java index 5ac6d5ed8..499295d65 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryType.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/DictionaryType.java @@ -83,6 +83,7 @@ public enum DictionaryType{ * Returns the <code>String</code> format of Type for this <code>PolicyClass</code> * @return the <code>String</code> of the Type for this <code>PolicyClass</code> */ + @Override public String toString() { return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyClass.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyClass.java index 5132a44be..6a648e8e6 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyClass.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyClass.java @@ -52,6 +52,7 @@ public enum PolicyClass { * Returns the <code>String</code> format of Type for this <code>PolicyClass</code> * @return the <code>String</code> of the Type for this <code>PolicyClass</code> */ + @Override public String toString() { return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigStatus.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigStatus.java index 23291c9b9..cee156786 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigStatus.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigStatus.java @@ -52,7 +52,7 @@ public enum PolicyConfigStatus { * if no match is found */ public static PolicyConfigStatus getStatus(String configStatus) { - if(configStatus.equalsIgnoreCase("retrieved")) { + if("retrieved".equalsIgnoreCase(configStatus)) { return CONFIG_RETRIEVED; }else { return CONFIG_NOT_FOUND; @@ -64,6 +64,7 @@ public enum PolicyConfigStatus { * * @return the <code>String</code> name for this <code>PolicyConfigStatus</code> */ + @Override public String toString(){ return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigType.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigType.java index 59fd42733..2fb5d96db 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigType.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyConfigType.java @@ -73,6 +73,7 @@ public enum PolicyConfigType{ * Returns the <code>String</code> format of Type for this <code>PolicyClass</code> * @return the <code>String</code> of the Type for this <code>PolicyClass</code> */ + @Override public String toString() { return name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyDecision.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyDecision.java index b5fdc1e01..6bae84cc7 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyDecision.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyDecision.java @@ -53,6 +53,7 @@ public enum PolicyDecision { * * @return the <code>String</code> name for this <code>PolicyDecision</code> */ + @Override public String toString(){ return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java index 1078916eb..2062638cf 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java @@ -568,6 +568,7 @@ public class PolicyParameters { this.extendedOption = extendedOption; } + @Override public String toString() { return "PolicyParameters [ policyName=" + policyName + ", policyDescription=" + policyDescription + ", onapName="+ onapName + ", configName=" + configName + ", attributes=" + attributes + ", configBody=" + configBody diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyResponseStatus.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyResponseStatus.java index 4368b646d..63cb9185c 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyResponseStatus.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyResponseStatus.java @@ -55,9 +55,9 @@ public enum PolicyResponseStatus { * @return the <code>PolicyResponseStatus</code> with the name matching <code>ACTION_ADVISED</code> or <code>ACTION_TAKEN</code> or <code>NO_ACTION_REQUIRED</code> */ public static PolicyResponseStatus getStatus(String responseStatus) { - if(responseStatus.equalsIgnoreCase("action_advised")) { + if("action_advised".equalsIgnoreCase(responseStatus)) { return ACTION_ADVISED; - }else if(responseStatus.equalsIgnoreCase("action_taken")) { + }else if("action_taken".equalsIgnoreCase(responseStatus)) { return ACTION_TAKEN; }else { return NO_ACTION_REQUIRED; @@ -69,6 +69,7 @@ public enum PolicyResponseStatus { * * @return the <code>String</code> name for this <code>PolicyResponseStatus</code> */ + @Override public String toString(){ return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyType.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyType.java index f026596e9..a29a6c440 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyType.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyType.java @@ -57,6 +57,7 @@ public enum PolicyType { * Returns the <code>String</code> format of Type for this <code>PolicyType</code> * @return the <code>String</code> of the Type for this <code>PolicyType</code> */ + @Override public String toString() { return this.name; } diff --git a/PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java b/PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java index c34e05e89..94ad67861 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java @@ -57,6 +57,7 @@ public enum RuleProvider { * Returns the <code>String</code> format of Type for this <code>AttributeType</code> * @return the <code>String</code> of the Type for this <code>AttributeType</code> */ + @Override public String toString() { return this.name; } |