}
}
}
- 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();
}
}
}
-
+ 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);
}
catch (Exception e){
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
}
return new ResponseEntity<String>(body, status);
}