Class DeploymentJobUnschedulingRequestCompletionHandler
java.lang.Object
com.broadleafcommerce.sandbox.messaging.completion.DeploymentJobUnschedulingRequestCompletionHandler
- All Implemented Interfaces:
- WorkflowRequestCompletionHandler
public class DeploymentJobUnschedulingRequestCompletionHandler
extends Object
implements WorkflowRequestCompletionHandler
This handler deals with updating the states and statuses of 
ChangeDeploys
 that have just finished being unscheduled.- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final ChangeDeployService<ChangeDeploy>protected final ChangeSummaryGroupService<ChangeSummaryGroup>protected final ChangeSummaryService<ChangeSummary>
- 
Constructor SummaryConstructorsConstructorDescriptionDeploymentJobUnschedulingRequestCompletionHandler(ChangeSummaryService<ChangeSummary> summaryService, ChangeSummaryGroupService<ChangeSummaryGroup> groupService, ChangeDeployService<ChangeDeploy> changeDeployService) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanHandle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Determines if this handler can handle the givenWorkflowRequestCompletion.voidhandle(com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Retrieves theChangeDeployfor which to complete the unscheduling process and whether the microservice sending thecompletion messageencountered errors while performing the scheduling.
- 
Field Details- 
summaryService
- 
groupService
- 
changeDeployService
 
- 
- 
Constructor Details- 
DeploymentJobUnschedulingRequestCompletionHandlerpublic DeploymentJobUnschedulingRequestCompletionHandler(ChangeSummaryService<ChangeSummary> summaryService, ChangeSummaryGroupService<ChangeSummaryGroup> groupService, ChangeDeployService<ChangeDeploy> changeDeployService) 
 
- 
- 
Method Details- 
canHandlepublic 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 interface- WorkflowRequestCompletionHandler
- Parameters:
- completion- a- WorkflowRequestCompletionreceived over the- WorkflowRequestCompletionConsumer channel
- Returns:
- whether this handler can handle the given WorkflowRequestCompletion
 
- 
handlepublic void handle(@NonNull com.broadleafcommerce.data.tracking.core.transition.WorkflowRequestCompletion completion) Retrieves theChangeDeployfor which to complete the unscheduling process and whether the microservice sending thecompletion messageencountered errors while performing the scheduling. The states of the deployment, groups, and summaries are all reset toChangeState.APPROVEDIf errors were encountered, the statuses of the groups, summaries, and deployment are updated to ChangeStatusType.ERROR_UNSCHEDULEand the error stack trace is recorded onto them.- Specified by:
- handlein interface- WorkflowRequestCompletionHandler
- Parameters:
- completion- a- WorkflowRequestCompletionreceived over the- WorkflowRequestCompletionConsumer channelcontaining information about the unscheduled- ChangeDeploy
- Throws:
- IllegalArgumentException- if the given deployment is invalid
- IllegalStateException- if there were errors experienced in performing the updates
 
 
-