Class RebasingWorkflowRequestCompletionHandler
java.lang.Object
com.broadleafcommerce.sandbox.messaging.completion.RebasingWorkflowRequestCompletionHandler
- All Implemented Interfaces:
WorkflowRequestCompletionHandler
public class RebasingWorkflowRequestCompletionHandler
extends Object
implements WorkflowRequestCompletionHandler
This handler deals with cleaning up rebased
ChangeSummaries' statuses.-
Constructor Summary
ConstructorsConstructorDescriptionRebasingWorkflowRequestCompletionHandler(ChangeSummaryService<ChangeSummary> summaryService, RebasingWorkflowRequestErrorHandler errorHandler, IndexNotificationService indexNotificationService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Determines if this handler can handle the givenWorkflowRequestCompletion.voidfinishRebasing(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion, String changeSummaryId) protected RebasingWorkflowRequestErrorHandlerprotected IndexNotificationServiceprotected ChangeSummaryService<ChangeSummary>voidhandle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Gleans the ID of theChangeSummaryfor which a rebasing was requested and updates it asChangeStatusType.FINISHEDif successfully rebased orChangeStatusType.ERROR_REBASEif it failed, including the error trace.
-
Constructor Details
-
RebasingWorkflowRequestCompletionHandler
public RebasingWorkflowRequestCompletionHandler(ChangeSummaryService<ChangeSummary> summaryService, RebasingWorkflowRequestErrorHandler 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 rebasing was requested and updates it asChangeStatusType.FINISHEDif successfully rebased orChangeStatusType.ERROR_REBASEif it failed, including the error trace.- Specified by:
handlein interfaceWorkflowRequestCompletionHandler- Parameters:
completion- aWorkflowRequestCompletionreceived over theWorkflowRequestCompletionConsumer channelcontaining information about the rebasedChangeSummary.
-
finishRebasing
public void finishRebasing(@NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion, String changeSummaryId) -
getSummaryService
-
getErrorHandler
-
getIndexNotificationService
-