summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actorServiceProvider/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src/main')
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java7
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java1
-rw-r--r--models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperation.java1
3 files changed, 9 insertions, 0 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java
index e2d94b3b3..0fd2c0bfd 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/OperationOutcome.java
@@ -43,6 +43,7 @@ public class OperationOutcome {
private PolicyResult result = PolicyResult.SUCCESS;
private String message;
private boolean finalOutcome;
+ private Object response;
private ControlLoopResponse controlLoopResponse;
/**
@@ -60,6 +61,7 @@ public class OperationOutcome {
this.result = source.result;
this.message = source.message;
this.finalOutcome = source.finalOutcome;
+ this.response = source.response;
this.controlLoopResponse = source.controlLoopResponse;
}
@@ -85,6 +87,11 @@ public class OperationOutcome {
return clo;
}
+ @SuppressWarnings("unchecked")
+ public <T> T getResponse() {
+ return (T) response;
+ }
+
/**
* Determines if this outcome is for the given actor and operation.
*
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
index 9decd8a61..8285a5635 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java
@@ -250,6 +250,7 @@ public abstract class BidirectionalTopicOperation<Q, S> extends OperationPartial
* @return the updated operation
*/
public OperationOutcome setOutcome(OperationOutcome outcome, PolicyResult result, S response) {
+ outcome.setResponse(response);
return setOutcome(outcome, result);
}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperation.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperation.java
index e83fe8c94..1acc1ff65 100644
--- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperation.java
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/HttpOperation.java
@@ -217,6 +217,7 @@ public abstract class HttpOperation<T> extends OperationPartial {
public OperationOutcome setOutcome(OperationOutcome outcome, PolicyResult result, Response rawResponse,
T response) {
+ outcome.setResponse(response);
return setOutcome(outcome, result);
}