aboutsummaryrefslogtreecommitdiffstats
path: root/applications/common
diff options
context:
space:
mode:
authorHOCKLA <ah999m@att.com>2019-10-14 14:25:29 -0500
committerAli Hockla <ah999m@att.com>2019-10-18 07:57:48 -0500
commit9ff68b1ed845e94944f99c32eef209eb63c6469d (patch)
tree7dfc63117d3a2f94e84e011368ace480563c14fc /applications/common
parentc19f81387f4efc666cfa45b000275f3ee7c1d9d1 (diff)
Modified Decision API to accept query parameters and abbreviate Monitor decision results
Issue-ID: POLICY-2126 Change-Id: I18d50a8746ede792ec9507ab98125383c5914ba1 Signed-off-by: HOCKLA <ah999m@att.com>
Diffstat (limited to 'applications/common')
-rw-r--r--applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java7
-rw-r--r--applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java3
-rw-r--r--applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java2
3 files changed, 7 insertions, 5 deletions
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java
index c3d66255..0b9975f7 100644
--- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java
+++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/XacmlApplicationServiceProvider.java
@@ -22,10 +22,9 @@
package org.onap.policy.pdp.xacml.application.common;
import com.att.research.xacml.api.Response;
-
import java.nio.file.Path;
import java.util.List;
-
+import java.util.Map;
import org.apache.commons.lang3.tuple.Pair;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
@@ -103,8 +102,10 @@ public interface XacmlApplicationServiceProvider {
* Makes a decision given the incoming request and returns a response.
*
* @param request Incoming DecisionRequest object
+ * @param requestQueryParameters Http request query parameters
* @return response Responding DecisionResponse object
*/
- Pair<DecisionResponse, Response> makeDecision(DecisionRequest request);
+ Pair<DecisionResponse, Response> makeDecision(DecisionRequest request,
+ Map<String, String[]> requestQueryParameters);
}
diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java
index 17119858..5f639c5c 100644
--- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java
+++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProvider.java
@@ -228,7 +228,8 @@ public abstract class StdXacmlApplicationServiceProvider implements XacmlApplica
}
@Override
- public Pair<DecisionResponse, Response> makeDecision(DecisionRequest request) {
+ public Pair<DecisionResponse, Response> makeDecision(DecisionRequest request,
+ Map<String, String[]> requestQueryParams) {
//
// Convert to a XacmlRequest
//
diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
index 30419daf..6139a528 100644
--- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
+++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdXacmlApplicationServiceProviderTest.java
@@ -263,7 +263,7 @@ public class StdXacmlApplicationServiceProviderTest {
DecisionResponse decresp = mock(DecisionResponse.class);
when(trans.convertResponse(resp)).thenReturn(decresp);
- Pair<DecisionResponse, Response> result = prov.makeDecision(decreq);
+ Pair<DecisionResponse, Response> result = prov.makeDecision(decreq, any());
assertSame(decresp, result.getKey());
assertSame(resp, result.getValue());