X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=PolicyEngineAPI%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fapi%2FPolicyParameters.java;h=0f34de0d13fa7975997b8025431faae860485229;hb=7e547eaa55920dfbc9691eab33bb728395b50cf2;hp=32cd75b5f0264dfc6e7c9b165bd1a405061db09b;hpb=91d04c64771832a0b8815ffbe1f0f9920320d94d;p=policy%2Fengine.git diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyParameters.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyParameters.java index 32cd75b5f..0f34de0d1 100644 --- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyParameters.java +++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyParameters.java @@ -20,6 +20,7 @@ package org.openecomp.policy.api; +import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; @@ -50,10 +51,13 @@ public class PolicyParameters { private List dynamicRuleAlgorithmField2; private String priority; private RuleProvider ruleProvider; + private String controllerName; + private ArrayList dependencyNames; private Date TTLDate; private boolean guard = false; private String riskLevel = "5"; - private String riskType = "defualt"; + private String riskType = "default"; + private String extendedOption; /** * Sets Config Policy Parameters. @@ -203,7 +207,9 @@ public class PolicyParameters { * @param policyConfigType the {@link org.openecomp.policy.api.PolicyConfigType} Enum format of the Config Type */ public void setPolicyConfigType(PolicyConfigType policyConfigType) { - setPolicyClass(PolicyClass.Config); + if(policyConfigType!=null){ + setPolicyClass(PolicyClass.Config); + } this.policyConfigType = policyConfigType; } @@ -444,7 +450,7 @@ public class PolicyParameters { /** * Sets the riskType field of the Policy Parameters. * - * @param guard the String format of the riskType value + * @param riskType the String format of the riskType value */ public void setRiskType(String riskType){ this.riskType = riskType; @@ -494,4 +500,58 @@ public class PolicyParameters { public Date getTtlDate(){ return TTLDate; } + + /** + * Gets the Controller Name for your policy. + * + * @return String format of the controller Name. + */ + public String getControllerName() { + return controllerName; + } + + /** + * Sets Controller Name for your policy. + * + * @param controllerName to identify the controller information for your policy. + */ + public void setControllerName(String controllerName) { + this.controllerName = controllerName; + } + + /** + * Gets Dependency Names for your policy. + * + * @return ArrayList of String(s) format of dependency names. + */ + public ArrayList getDependencyNames() { + return dependencyNames; + } + + /** + * Sets Dependency that your policy is dependent on. + * + * @param dependencyNames ArrayList of String(s). + */ + public void setDependencyNames(ArrayList dependencyNames) { + this.dependencyNames = dependencyNames; + } + + public String getExtendedOption() { + return extendedOption; + } + + public void setExtendedOption(String extendedOption) { + this.extendedOption = extendedOption; + } + + public String toString() { + return "PolicyParameters [ policyName=" + policyName + ", policyDescription=" + policyDescription + ", ecompName="+ ecompName + + ", configName=" + configName + ", attributes=" + attributes + ", configBody=" + configBody + + ",dynamicRuleAlgorithmLabels=" + dynamicRuleAlgorithmLabels + ",dynamicRuleAlgorithmFunctions=" + dynamicRuleAlgorithmFunctions + + ",dynamicRuleAlgorithmField1=" + dynamicRuleAlgorithmField1 + ",dynamicRuleAlgorithmField2=" + dynamicRuleAlgorithmField2 + + ", actionPerformer=" + actionPerformer + ", actionAttribute=" + actionAttribute + ", priority=" + priority + + ", ruleProvider= " + ruleProvider + ", riskLevel= " + riskLevel + ", riskType= " + riskType + ", extendedOption= " + extendedOption + + "]"; + } }