Class ReversionWorkflowRequestCompletionHandler
java.lang.Object
com.broadleafcommerce.sandbox.messaging.completion.ReversionWorkflowRequestCompletionHandler
- All Implemented Interfaces:
WorkflowRequestCompletionHandler
public class ReversionWorkflowRequestCompletionHandler
extends Object
implements WorkflowRequestCompletionHandler
-
Constructor Summary
ConstructorsConstructorDescriptionReversionWorkflowRequestCompletionHandler(ChangeSummaryService<ChangeSummary> summaryService, ReversionWorkflowRequestErrorHandler errorHandler, IndexNotificationService indexNotificationService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Determines if this handler can handle the givenWorkflowRequestCompletion.voidfinishReversion(String changeSummaryId) protected ReversionWorkflowRequestErrorHandlerprotected IndexNotificationServiceprotected SandboxService<Sandbox>protected ChangeSummaryService<ChangeSummary>voidhandle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Gleans the ID of theChangeSummaryfor which a reversion was requested and archives it if the microservice reports a successful reversion.voidsetProperties(CompletionCleanupProperties properties) voidsetSandboxService(SandboxService<Sandbox> sandboxService)
-
Constructor Details
-
ReversionWorkflowRequestCompletionHandler
public ReversionWorkflowRequestCompletionHandler(ChangeSummaryService<ChangeSummary> summaryService, ReversionWorkflowRequestErrorHandler errorHandler, IndexNotificationService indexNotificationService)
-
-
Method Details
-
canHandle
public boolean canHandle(@NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Description copied from interface:WorkflowRequestCompletionHandlerDetermines if this handler can handle the givenWorkflowRequestCompletion. This is typically done by checking theWorkflowRequestCompletion.getRequestType().- Specified by:
canHandlein interfaceWorkflowRequestCompletionHandler- Parameters:
completion- aWorkflowRequestCompletionreceived over theWorkflowRequestCompletionConsumer channel- Returns:
- whether this handler can handle the given
WorkflowRequestCompletion
-
handle
public void handle(@NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Gleans the ID of theChangeSummaryfor which a reversion was requested and archives it if the microservice reports a successful reversion. If the microservice is reporting a error during the reversion, then the summary's status is changed toChangeStatusType.ERROR_REVERTand the error trace is added to it.- Specified by:
handlein interfaceWorkflowRequestCompletionHandler- Parameters:
completion- aWorkflowRequestCompletionreceived over theWorkflowRequestCompletionConsumer channelcontaining information about the revertedChangeSummary.
-
finishReversion
-
getSummaryService
-
getErrorHandler
-
getIndexNotificationService
-
getSandboxService
-
setSandboxService
-
setProperties
-