aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
diff options
context:
space:
mode:
authorITSERVICES\rb7147 <rb7147@att.com>2017-05-08 22:20:44 -0400
committerITSERVICES\rb7147 <rb7147@att.com>2017-05-09 13:58:03 -0400
commitdda032f8bb161d54eb1f59de2b4a3efb774fc4d1 (patch)
tree9a11825d59434d97bb0c7dcbf00a0b84e7e5f526 /ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
parenta330af579866dacbe595e2e4ad1dd29cd3c96945 (diff)
Policy 1707 Second commit
Change-Id: I18f5b142238733d17280cf17c3d1dd28204d34e9 Signed-off-by: ITSERVICES\rb7147 <rb7147@att.com>
Diffstat (limited to 'ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java')
-rw-r--r--ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
index a987e9abf..b9d6def5a 100644
--- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
+++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/policycontroller/PolicyCreation.java
@@ -349,7 +349,7 @@ public class PolicyCreation extends AbstractPolicyCreation{
}
}
}
- if(policyData.getRuleAlgorithmschoices().size() > 0){
+ if(policyData.getRuleAlgorithmschoices()!=null && policyData.getRuleAlgorithmschoices().size() > 0){
for(Object attribute : policyData.getRuleAlgorithmschoices()){
if(attribute instanceof LinkedHashMap<?, ?>){
String label = ((LinkedHashMap<?, ?>) attribute).get("id").toString();
@@ -363,7 +363,14 @@ public class PolicyCreation extends AbstractPolicyCreation{
}
}
}
-
+ if(policyData.getRuleProvider()!=null && policyData.getRuleProvider().equals(DecisionPolicy.GUARD_YAML) && policyData.getYamlparams()!=null){
+ attributeMap.put("actor", policyData.getYamlparams().getActor());
+ attributeMap.put("recipe", policyData.getYamlparams().getRecipe());
+ attributeMap.put("limit", policyData.getYamlparams().getLimit());
+ attributeMap.put("timeWindow", policyData.getYamlparams().getTimeWindow());
+ attributeMap.put("guardActiveStart", policyData.getYamlparams().getGuardActiveStart());
+ attributeMap.put("guardActiveEnd", policyData.getYamlparams().getGuardActiveEnd());
+ }
policyData.setDynamicRuleAlgorithmLabels(dynamicRuleAlgorithmLabels);
policyData.setDynamicRuleAlgorithmCombo(dynamicRuleAlgorithmCombo);
policyData.setDynamicRuleAlgorithmField1(dynamicRuleAlgorithmField1);