X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=PolicyEngineAPI%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fapi%2FPolicyParameters.java;h=cb51e481dd24445f06714913612292f92c6a0aeb;hb=06f456d8d06840a21f48531b0bd35b1a429b10f9;hp=0d76d8f1397c170958cd4d2af4b63436dc6cee37;hpb=073cc188efe9abb4c010cf674e34e2cf46ef1c52;p=policy%2Fengine.git 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 0d76d8f13..cb51e481d 100644 --- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java +++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java @@ -40,6 +40,7 @@ public class PolicyParameters { private String onapName; private String configName; private Map> attributes; + private Map treatments; private String configBody; private PolicyType configBodyType; private String actionPerformer; @@ -52,8 +53,8 @@ public class PolicyParameters { private String priority; private RuleProvider ruleProvider; private String controllerName; - private ArrayList dependencyNames; - private Date TTLDate; + private List dependencyNames; + private Date ttlDate; private boolean guard = false; private String riskLevel = "5"; private String riskType = "default"; @@ -146,6 +147,17 @@ public class PolicyParameters { public String getOnapName() { return onapName; } + + /** + * Gets the ONAP Name value of the Policy Paramters. + * + * @return String format of the ONAP Name + * @deprecated Use {@link #getOnapName()} instead. + */ + @Deprecated + public String getEcompName() { + return onapName; + } /** * Sets the ONAP Name field of the Policy Parameters. @@ -155,6 +167,18 @@ public class PolicyParameters { public void setOnapName(String onapName) { this.onapName = onapName; } + + /** + * Sets the ONAP Name field of the Policy Parameters. + * + * @param ecompName the String format of the ONAP Name + * @deprecated use {@link #setOnapName(String)} instead. + */ + @Deprecated + public void setEcompName(String ecompName) { + this.onapName = ecompName; + } + /** * Gets the Config Name value of the Policy Parameters. @@ -486,10 +510,10 @@ public class PolicyParameters { /** * Sets the TTLDate field of the Policy Parameters. * - * @param TTLDate the Date format of the TTLDate value + * @param ttlDate the Date format of the TTLDate value */ - public void setTtlDate(Date TTLDate){ - this.TTLDate = TTLDate; + public void setTtlDate(Date ttlDate){ + this.ttlDate = ttlDate; } /** @@ -498,7 +522,7 @@ public class PolicyParameters { * @return the Date value of the TTLDate for Config Policies */ public Date getTtlDate(){ - return TTLDate; + return ttlDate; } /** @@ -524,7 +548,7 @@ public class PolicyParameters { * * @return ArrayList of String(s) format of dependency names. */ - public ArrayList getDependencyNames() { + public List getDependencyNames() { return dependencyNames; } @@ -533,7 +557,7 @@ public class PolicyParameters { * * @param dependencyNames ArrayList of String(s). */ - public void setDependencyNames(ArrayList dependencyNames) { + public void setDependencyNames(List dependencyNames) { this.dependencyNames = dependencyNames; } @@ -545,6 +569,25 @@ public class PolicyParameters { this.extendedOption = extendedOption; } + /** + * Gets Allowed Treatments Map for Rainy Day Decision Policy + * + * @return Map of String format for treatments per errorcode + */ + public Map getTreatments() { + return treatments; + } + + /** + * Sets Allowed Treatments Map for Rainy Day Decision Policy + * + * @param treatments Map that contains the treatment per errorcode + */ + public void setTreatments(Map treatments) { + this.treatments = treatments; + } + + @Override public String toString() { return "PolicyParameters [ policyName=" + policyName + ", policyDescription=" + policyDescription + ", onapName="+ onapName + ", configName=" + configName + ", attributes=" + attributes + ", configBody=" + configBody @@ -552,6 +595,6 @@ public class PolicyParameters { + ",dynamicRuleAlgorithmField1=" + dynamicRuleAlgorithmField1 + ",dynamicRuleAlgorithmField2=" + dynamicRuleAlgorithmField2 + ", actionPerformer=" + actionPerformer + ", actionAttribute=" + actionAttribute + ", priority=" + priority + ", ruleProvider= " + ruleProvider + ", riskLevel= " + riskLevel + ", riskType= " + riskType + ", extendedOption= " + extendedOption - + "]"; + + ", treatments= " + treatments + "]"; } }