summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-05-03 13:57:11 -0400
committerPamela Dragosh <pdragosh@research.att.com>2019-05-03 13:57:17 -0400
commit8039c0bae81eb34b397e389573aa83168aa350b5 (patch)
treee36149098a8f270ddc5dc37ccd2091f6aeec9a8d
parent40ced02a4e9d0ec2f4cc0845a37b2276e495c898 (diff)
Decision should return dictionary
Should not be an array of policies, should be a dictionary. Issue-ID: POLICY-1735 Change-Id: Ia88ef65dd332933aafbe6b57693344d5d43c53b8 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
-rw-r--r--models-decisions/src/main/java/org/onap/policy/models/decisions/concepts/DecisionResponse.java3
-rw-r--r--models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java4
2 files changed, 3 insertions, 4 deletions
diff --git a/models-decisions/src/main/java/org/onap/policy/models/decisions/concepts/DecisionResponse.java b/models-decisions/src/main/java/org/onap/policy/models/decisions/concepts/DecisionResponse.java
index b4f288685..b0b21d2c2 100644
--- a/models-decisions/src/main/java/org/onap/policy/models/decisions/concepts/DecisionResponse.java
+++ b/models-decisions/src/main/java/org/onap/policy/models/decisions/concepts/DecisionResponse.java
@@ -20,7 +20,6 @@
package org.onap.policy.models.decisions.concepts;
-import java.util.List;
import java.util.Map;
import lombok.Data;
@@ -36,5 +35,5 @@ public class DecisionResponse {
private String status;
private Map<String, Object> advice;
private Map<String, Object> obligations;
- private List<Map<String, Object>> policies;
+ private Map<String, Object> policies;
}
diff --git a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
index a2a06a4fb..25606eef1 100644
--- a/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
+++ b/models-interactions/model-simulators/src/main/java/org/onap/policy/simulators/GuardSimulatorJaxRs.java
@@ -56,13 +56,13 @@ public class GuardSimulatorJaxRs {
response.setStatus("Deny");
response.setAdvice(Collections.emptyMap());
response.setObligations(Collections.emptyMap());
- response.setPolicies(Collections.emptyList());
+ response.setPolicies(Collections.emptyMap());
return response;
} else {
response.setStatus("Permit");
response.setAdvice(Collections.emptyMap());
response.setObligations(Collections.emptyMap());
- response.setPolicies(Collections.emptyList());
+ response.setPolicies(Collections.emptyMap());
return response;
}
}