summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java
diff options
context:
space:
mode:
authorTej, Tarun <tt3868@att.com>2017-09-22 00:49:10 -0400
committerTej, Tarun <tt3868@att.com>2017-09-22 00:55:06 -0400
commitb0f132227b0d77ea847f40d07f57d9d053c1555e (patch)
tree5ab56d0fe8e30ef7feb96352d648339190736c9a /ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java
parent1b6feb8d0ca8094a0b7a552f1e3907f206be2527 (diff)
Additional Junit coverage for PAP REST
additional tests for Policy engine PAP project Issue-Id: POLICY-52 Change-Id: I9a23ca758783e8f370c82a56143b53e3c858051c Signed-off-by: Tej, Tarun <tt3868@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java
index eae3e79a9..d870ca86c 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/DecisionPolicy.java
@@ -63,6 +63,7 @@ import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.onap.policy.xacml.std.pip.engines.aaf.AAFEngine;
import org.onap.policy.xacml.util.XACMLPolicyScanner;
+import com.att.research.xacml.api.XACML3;
import com.att.research.xacml.api.pap.PAPException;
import com.att.research.xacml.std.IdentifierImpl;
@@ -423,7 +424,6 @@ public class DecisionPolicy extends Policy {
// Values for AAF Provider are here for XML Creation.
ConditionType condition = new ConditionType();
ApplyType decisionApply = new ApplyType();
- String selectedFunction = "boolean-equal";
AttributeValueType value1 = new AttributeValueType();
value1.setDataType(BOOLEAN_DATATYPE);
@@ -439,7 +439,7 @@ public class DecisionPolicy extends Policy {
innerDecisionApply.setFunctionId(FUNCTION_BOOLEAN_ONE_AND_ONLY);
innerDecisionApply.getExpression().add(new ObjectFactory().createAttributeDesignator(value2));
- decisionApply.setFunctionId(dropDownMap.get(selectedFunction));
+ decisionApply.setFunctionId(XACML3.ID_FUNCTION_BOOLEAN_EQUAL.stringValue());
decisionApply.getExpression().add(new ObjectFactory().createAttributeValue(value1));
decisionApply.getExpression().add(new ObjectFactory().createApply(innerDecisionApply));
condition.setExpression(new ObjectFactory().createApply(decisionApply));