Class TransitionListener
java.lang.Object
com.broadleafcommerce.data.tracking.core.messaging.TransitionListener
Listen for
WorkflowTransitionRequests
to come in through the
various sandbox message channels (i.e., PromotionConsumer
, DeploymentConsumer
,
RejectionConsumer
, and ReversionConsumer
) in order to delegate to the list of
preconconfigured bean for TransitionHandlers
. This will execute any
TransitionHandlerCustomizer
as a post construct.- Author:
- Chad Harchar (charchar)
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<TransitionHandlerCustomizer>
protected com.broadleafcommerce.common.messaging.service.MessageLockService
protected List<TransitionHandler>
-
Constructor Summary
ConstructorDescriptionTransitionListener
(List<TransitionHandlerCustomizer> customizers, List<TransitionHandler> transitionHandlers) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> void
checkIdempotency
(org.springframework.messaging.Message<T> message, String listenerName, String route, Consumer<org.springframework.messaging.Message<T>> operation) Consume a transition message by performing an idempotency check before executing the operation.void
handle
(WorkflowDeployRequest request) void
handle
(WorkflowPromoteRequest request) void
handle
(WorkflowRebaseRequest request) void
handle
(WorkflowRejectRequest request) void
handle
(WorkflowRevertRequest request) void
handleDeploy
(org.springframework.messaging.Message<WorkflowDeployRequest> request) void
handlePromote
(org.springframework.messaging.Message<WorkflowPromoteRequest> request) void
handleRebase
(org.springframework.messaging.Message<WorkflowRebaseRequest> request) void
handleReject
(org.springframework.messaging.Message<WorkflowRejectRequest> request) void
handleRevert
(org.springframework.messaging.Message<WorkflowRevertRequest> request) void
setLockService
(com.broadleafcommerce.common.messaging.service.MessageLockService lockService)
-
Field Details
-
customizers
-
transitionHandlers
-
lockService
protected com.broadleafcommerce.common.messaging.service.MessageLockService lockService
-
-
Constructor Details
-
TransitionListener
public TransitionListener(List<TransitionHandlerCustomizer> customizers, List<TransitionHandler> transitionHandlers)
-
-
Method Details
-
handlePromote
@StreamListener("promotionInput") public void handlePromote(org.springframework.messaging.Message<WorkflowPromoteRequest> request) -
handle
-
handleDeploy
@StreamListener("deploymentInput") public void handleDeploy(org.springframework.messaging.Message<WorkflowDeployRequest> request) -
handle
-
handleReject
@StreamListener("rejectionInput") public void handleReject(org.springframework.messaging.Message<WorkflowRejectRequest> request) -
handle
-
handleRevert
@StreamListener("reversionInput") public void handleRevert(org.springframework.messaging.Message<WorkflowRevertRequest> request) -
handle
-
handleRebase
@StreamListener("rebasingInput") public void handleRebase(org.springframework.messaging.Message<WorkflowRebaseRequest> request) -
handle
-
checkIdempotency
protected <T> void checkIdempotency(org.springframework.messaging.Message<T> message, String listenerName, String route, Consumer<org.springframework.messaging.Message<T>> operation) Consume a transition message by performing an idempotency check before executing the operation.- Type Parameters:
T
- The payload type of the message- Parameters:
message
- The message to check and processlistenerName
- The listener name to associate with the idempotencyroute
- The route on which processing will take placeoperation
- The operation to execution with the message
-
setLockService
@Autowired public void setLockService(com.broadleafcommerce.common.messaging.service.MessageLockService lockService)
-