package org.onap.policy.controlloop.actor.sdnr;
import java.util.List;
-import java.util.concurrent.CompletableFuture;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
return List.of(getSubRequestId());
}
- @Override
- protected CompletableFuture<OperationOutcome> startPreprocessorAsync() {
- return startGuardAsync();
- }
-
/*
* NOTE: This should avoid throwing exceptions, so that a ControlLoopResponse can be
* added to the outcome. Consequently, it returns FAILURE if a required field is
requestCommonHeader.setSubRequestId(subRequestId);
sdnrRequest.setCommonHeader(requestCommonHeader);
- sdnrRequest.setPayload(getEventPayload());
+ sdnrRequest.setPayload(getProperty(OperationProperties.EVENT_PAYLOAD));
sdnrRequest.setAction(params.getOperation());
/*
/* Return the request to be sent through dmaap. */
return dmaapRequest;
}
-
- /**
- * Gets the event payload, first checking for it in the properties and then in the
- * event.
- *
- * @return the event payload
- */
- protected String getEventPayload() {
- if (containsProperty(OperationProperties.EVENT_PAYLOAD)) {
- return getProperty(OperationProperties.EVENT_PAYLOAD);
- }
-
- return params.getContext().getEvent().getPayload();
- }
}