From 7cc5fd31420bf71b41853a66c0a0b66bd9495ef3 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 3 May 2021 15:02:17 -0400 Subject: Refactor common code from UsecasesEventManager Created ClEventManagerWithSteps, as a subclass of ControlLoopEventManager. It contains the "Steps" to be performed and also deals with outcomes. Created ClEventManagerWithEvent, as a subclass of that. It contains a VirtualControlLoopEvent object, and uses that to populate data used by the superclass. Updates per review comments: - made loadPolicy() protected - refactored another level to manage operation outcomes Issue-ID: POLICY-3262 Change-Id: Ibf5dd114746ae26e04fe37d562273fc81dd8cfbe Signed-off-by: Jim Hahn --- .../common/controller-usecases/src/main/resources/usecases.drl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'controlloop/common/controller-usecases/src/main/resources') diff --git a/controlloop/common/controller-usecases/src/main/resources/usecases.drl b/controlloop/common/controller-usecases/src/main/resources/usecases.drl index 12c9849f9..49ab78d71 100644 --- a/controlloop/common/controller-usecases/src/main/resources/usecases.drl +++ b/controlloop/common/controller-usecases/src/main/resources/usecases.drl @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,9 +42,9 @@ import org.onap.policy.controlloop.eventmanager.ActorConstants; import org.onap.policy.controlloop.eventmanager.Step; import org.onap.policy.controlloop.utils.ControlLoopUtils; import org.onap.policy.drools.apps.controller.usecases.UsecasesEventManager; -import org.onap.policy.drools.apps.controller.usecases.UsecasesEventManager.State; -import org.onap.policy.drools.apps.controller.usecases.UsecasesEventManager.NewEventStatus; -import org.onap.policy.drools.apps.controller.usecases.UsecasesEventManager.OperationOutcome2; +import org.onap.policy.controlloop.eventmanager.ClEventManagerWithSteps.State; +import org.onap.policy.controlloop.eventmanager.ClEventManagerWithOutcome.OperationOutcome2; +import org.onap.policy.controlloop.eventmanager.ClEventManagerWithEvent.NewEventStatus; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; import org.slf4j.LoggerFactory; -- cgit 1.2.3-korg