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 TypeMethodDescriptionboolean
canHandle
(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Determines if this handler can handle the givenWorkflowRequestCompletion
.void
finishRebasing
(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion, String changeSummaryId) protected RebasingWorkflowRequestErrorHandler
protected IndexNotificationService
protected ChangeSummaryService<ChangeSummary>
void
handle
(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Gleans the ID of theChangeSummary
for which a rebasing was requested and updates it asChangeStatusType.FINISHED
if successfully rebased orChangeStatusType.ERROR_REBASE
if 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:WorkflowRequestCompletionHandler
Determines if this handler can handle the givenWorkflowRequestCompletion
. This is typically done by checking theWorkflowRequestCompletion.getRequestType()
.- Specified by:
canHandle
in interfaceWorkflowRequestCompletionHandler
- Parameters:
completion
- aWorkflowRequestCompletion
received 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 theChangeSummary
for which a rebasing was requested and updates it asChangeStatusType.FINISHED
if successfully rebased orChangeStatusType.ERROR_REBASE
if it failed, including the error trace.- Specified by:
handle
in interfaceWorkflowRequestCompletionHandler
- Parameters:
completion
- aWorkflowRequestCompletion
received over theWorkflowRequestCompletionConsumer channel
containing information about the rebasedChangeSummary
.
-
finishRebasing
public void finishRebasing(@NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion, String changeSummaryId) -
getSummaryService
-
getErrorHandler
-
getIndexNotificationService
-