Class ReversionWorkflowRequestCompletionHandler

java.lang.Object
com.broadleafcommerce.sandbox.messaging.completion.ReversionWorkflowRequestCompletionHandler
All Implemented Interfaces:
WorkflowRequestCompletionHandler

public class ReversionWorkflowRequestCompletionHandler extends Object implements WorkflowRequestCompletionHandler
  • Constructor Details

  • 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 given WorkflowRequestCompletion. This is typically done by checking the WorkflowRequestCompletion.getRequestType().
      Specified by:
      canHandle in interface WorkflowRequestCompletionHandler
      Parameters:
      completion - a WorkflowRequestCompletion received over the WorkflowRequestCompletionConsumer 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 the ChangeSummary for 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 to ChangeStatusType.ERROR_REVERT and the error trace is added to it.
      Specified by:
      handle in interface WorkflowRequestCompletionHandler
      Parameters:
      completion - a WorkflowRequestCompletion received over the WorkflowRequestCompletionConsumer channel containing information about the reverted ChangeSummary.
    • finishReversion

      public void finishReversion(String changeSummaryId)
    • getSummaryService

      protected ChangeSummaryService<ChangeSummary> getSummaryService()
    • getErrorHandler

      protected ReversionWorkflowRequestErrorHandler getErrorHandler()
    • getIndexNotificationService

      protected IndexNotificationService getIndexNotificationService()
    • getSandboxService

      protected SandboxService<Sandbox> getSandboxService()
    • setSandboxService

      @Autowired public void setSandboxService(@Nullable SandboxService<Sandbox> sandboxService)
    • setProperties

      @Autowired public void setProperties(CompletionCleanupProperties properties)