X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fpolicycontroller%2FPolicyCreation.java;h=a6cda5e680f66c04fb5fcdf6a77c5fab63255631;hb=95524c8ef8be0d41de8bb2b918f320e464ebb897;hp=f7ef1a097eb452a4d2450183b225b25619a25377;hpb=a65d684a684105c39a64181bbd44f1debb80fb06;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java index f7ef1a097..a6cda5e68 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/policycontroller/PolicyCreation.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -416,6 +416,16 @@ public class PolicyCreation extends AbstractPolicyCreation{ String blackList = StringUtils.join(policyData.getYamlparams().getBlackList(), ","); attributeMap.put("blackList", blackList); } + if(DecisionPolicy.GUARD_BL_YAML.equals(policyData.getRuleProvider()) && "Use File Upload".equals(policyData.getBlackListEntryType())){ + if(policyData.getBlackListEntries() != null && !policyData.getBlackListEntries().isEmpty()){ + String blackList = StringUtils.join(policyData.getBlackListEntries(), ","); + attributeMap.put("blackList", blackList); + } + if(policyData.getAppendBlackListEntries() != null && !policyData.getAppendBlackListEntries().isEmpty()){ + String blackList = StringUtils.join(policyData.getAppendBlackListEntries(), ","); + attributeMap.put("appendBlackList", blackList); + } + } if(policyData.getYamlparams().getTargets()!=null){ String targets = StringUtils.join(policyData.getYamlparams().getTargets(),","); attributeMap.put("targets", targets);