aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src/main/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2021-05-04 17:34:03 -0400
committerJim Hahn <jrh3@att.com>2021-05-05 12:53:55 -0400
commitd304f7d3a058b024ab413374e1a6065411903e3c (patch)
tree08e3966a424e8234c4ba62a033aed0510852bc3f /controlloop/common/controller-usecases/src/main/java
parent7cc5fd31420bf71b41853a66c0a0b66bd9495ef3 (diff)
EventManagerServices shouldn't be static
Currently, the event manager uses a static EventManagerServices object, which precludes the possibility of configuring the actors, for each rule set, from using different properties. Modified the code to allow the rules to specify the event services to use on a per manager basis. Issue-ID: POLICY-3260 Change-Id: If493ae1b55cb752f11e0b2f72dced9c4f3883e34 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/controller-usecases/src/main/java')
-rw-r--r--controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
index 4db243408..cb71f8ea0 100644
--- a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
+++ b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
@@ -51,6 +51,7 @@ import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOp
import org.onap.policy.controlloop.drl.legacy.ControlLoopParams;
import org.onap.policy.controlloop.eventmanager.ActorConstants;
import org.onap.policy.controlloop.eventmanager.ClEventManagerWithEvent;
+import org.onap.policy.controlloop.eventmanager.EventManagerServices;
import org.onap.policy.controlloop.eventmanager.StepContext;
import org.onap.policy.drools.apps.controller.usecases.step.AaiCqStep2;
import org.onap.policy.drools.apps.controller.usecases.step.AaiGetPnfStep2;
@@ -105,16 +106,17 @@ public class UsecasesEventManager extends ClEventManagerWithEvent<Step2> impleme
/**
* Constructs the object.
*
+ * @param services services the manager should use when processing the event
* @param params control loop parameters
* @param event event to be managed by this object
* @param workMem working memory to update if this changes
* @throws ControlLoopException if the event is invalid or if a YAML processor cannot
* be created
*/
- public UsecasesEventManager(ControlLoopParams params, VirtualControlLoopEvent event, WorkingMemory workMem)
- throws ControlLoopException {
+ public UsecasesEventManager(EventManagerServices services, ControlLoopParams params, VirtualControlLoopEvent event,
+ WorkingMemory workMem) throws ControlLoopException {
- super(params, event, workMem);
+ super(services, params, event, workMem);
if (isClosedLoopDisabled(event)) {
throw new IllegalStateException("is-closed-loop-disabled is set to true on VServer or VNF");