X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-interactions%2Fmodel-actors%2FactorServiceProvider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontrolloop%2Factorserviceprovider%2Fparameters%2FControlLoopOperationParams.java;h=67f68036bc27dfef0301e484e7640aad23dea6c7;hb=19ef8b24a98c09a349e6ae7309f535a0135463f6;hp=0e4f09b66c202cb279bff37476d2ddb550b9e2d2;hpb=6b29d2c19e288148171db0c0e446e18dcd46effd;p=policy%2Fmodels.git diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/ControlLoopOperationParams.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/ControlLoopOperationParams.java index 0e4f09b66..67f68036b 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/ControlLoopOperationParams.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/parameters/ControlLoopOperationParams.java @@ -33,13 +33,11 @@ import lombok.Getter; import org.onap.policy.common.parameters.BeanValidationResult; import org.onap.policy.common.parameters.BeanValidator; import org.onap.policy.common.parameters.annotations.NotNull; -import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.actorserviceprovider.ActorService; import org.onap.policy.controlloop.actorserviceprovider.Operation; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.TargetType; import org.onap.policy.controlloop.actorserviceprovider.Util; -import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -74,14 +72,10 @@ public class ControlLoopOperationParams { private ActorService actorService; /** - * Event for which the operation applies. - */ - // TODO to be removed - private ControlLoopEventContext context; - - /** - * If {@code null}, this value is extracted from the context. + * Request ID with which all actor operations are associated. Used to track requests + * across various components/servers. */ + @NotNull private UUID requestId; /** @@ -106,6 +100,7 @@ public class ControlLoopOperationParams { * {@code True} if the preprocessing steps have already been executed, {@code false} * otherwise. */ + // TODO remove this once the rules no longer reference it private boolean preprocessed; /** @@ -194,11 +189,6 @@ public class ControlLoopOperationParams { * @return the event's request ID, or {@code null} if no request ID is available */ public UUID getRequestId() { - if (requestId == null && context != null && context.getEvent() != null) { - // cache the request ID - requestId = context.getEvent().getRequestId(); - } - return requestId; } @@ -266,34 +256,6 @@ public class ControlLoopOperationParams { * @return the validation result */ public BeanValidationResult validate() { - BeanValidationResult result = - new BeanValidator().validateTop(ControlLoopOperationParams.class.getSimpleName(), this); - - // validate that we have a request ID, or that we can get it from the context's - // event - - if (context == null) { - // no context specified - invoker must provide a request ID then - result.validateNotNull("requestId", requestId); - - } else if (requestId == null) { - // have a context, but no request ID - check the context's event for the - // request ID - BeanValidationResult contextResult = new BeanValidationResult("context", context); - VirtualControlLoopEvent event = context.getEvent(); - contextResult.validateNotNull("event", event); - - if (event != null) { - // cache the request id for later use - BeanValidationResult eventResult = new BeanValidationResult("event", event); - eventResult.validateNotNull("requestId", event.getRequestId()); - - contextResult.addResult(eventResult); - } - - result.addResult(contextResult); - } - - return result; + return new BeanValidator().validateTop(ControlLoopOperationParams.class.getSimpleName(), this); } }