summaryrefslogtreecommitdiffstats
path: root/PolicyEngineAPI
diff options
context:
space:
mode:
authorMichael Mokry <mm117s@att.com>2017-09-26 08:49:34 -0500
committerMichael Mokry <mm117s@att.com>2017-09-26 09:40:47 -0500
commitd86da782fa13652ab4fa7227394d4a3d1fe55e18 (patch)
tree409466e9afd7685fcfa5e7b6810383c2fbb83b95 /PolicyEngineAPI
parent04c6945fea6a17b89affe2e1a1304e03005136b7 (diff)
Policy API support for Rainy Day Decision Policy
Enhances the Rainy Day Decision Policy by providing API support to manage Rainy Day Decision policies and dictionaries Change-Id: Ia7c49199ac057fa8bcc9de74f5e0b8dba395d43a Issue-ID: POLICY-269 Signed-off-by: Michael Mokry <mm117s@att.com>
Diffstat (limited to 'PolicyEngineAPI')
-rw-r--r--PolicyEngineAPI/src/main/java/org/onap/policy/api/PolicyParameters.java21
-rw-r--r--PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java6
2 files changed, 25 insertions, 2 deletions
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 2062638cf..ae9ba8a88 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<AttributeType, Map<String,String>> attributes;
+ private Map<String, String> treatments;
private String configBody;
private PolicyType configBodyType;
private String actionPerformer;
@@ -568,6 +569,24 @@ 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<String, String> 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<String, String> treatments) {
+ this.treatments = treatments;
+ }
+
@Override
public String toString() {
return "PolicyParameters [ policyName=" + policyName + ", policyDescription=" + policyDescription + ", onapName="+ onapName
@@ -576,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 + "]";
}
}
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 94ad67861..2e45549fc 100644
--- a/PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java
+++ b/PolicyEngineAPI/src/main/java/org/onap/policy/api/RuleProvider.java
@@ -44,7 +44,11 @@ public enum RuleProvider {
/**
* Indicates Guard BLACKLIST YAML
*/
- GUARD_BL_YAML("GUARD_BL_YAML")
+ GUARD_BL_YAML("GUARD_BL_YAML"),
+ /**
+ * Indicates Guard BLACKLIST YAML
+ */
+ RAINY_DAY("Rainy_Day")
;
private String name;