Interface DeploymentRequestHandler
- All Known Implementing Classes:
DefaultDeploymentRequestHandler
public interface DeploymentRequestHandler
Responsible for scheduling and executing deployments.
- Author:
- Nathan Moore (nathandmoore), Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear(String changeDeployId, boolean vendorNarrowing, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts an ID for aChangeDeploythat previously failed and starts the process of clearing the error state of the deployment.voiddeploy(ChangeSummaryGroups scheduleGroups, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String sandbox, int level) Deprecated.voiddeploy(ChangeSummaryGroups scheduleGroups, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String sandbox, int level, boolean vendorNarrowing) Creates a newChangeDeployfor the givenChangeSummaryGroupsand executes immediate deployment.voiddeploy(ChangeSummaryGroups scheduleGroups, Stream<ChangeSummary> summaries, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String sandbox, int level) Deprecated.since 1.3, replaced bydeploy(ChangeSummaryGroups, Stream, ContextInfo, String, int, boolean)voiddeploy(ChangeSummaryGroups scheduleGroups, Stream<ChangeSummary> summaries, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String sandbox, int level, boolean vendorNarrowing) Creates a newChangeDeployfor the givenChangeSummaryGroupsand executes immediate deployment.voidexecuteDeployment(String deployId) Finds an existing, previously scheduledChangeDeployand sends out aWorkflowDeployRequestperChangeSummaryin the deployment via the relevant Spring Cloud channel.voidschedule(ChangeSummaryGroups scheduleGroups, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String sandbox, Instant deployTime, int level) Deprecated.since 1.3, replaced byschedule(ChangeSummaryGroups, ContextInfo, String, Instant, int, boolean)voidschedule(ChangeSummaryGroups scheduleGroups, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String sandbox, Instant deployTime, int level, boolean vendorNarrowing) Creates a newChangeDeployfor the givenChangeSummaryGroupsand schedules it for the given deployTime.voidunschedule(String changeDeployId) Deprecated.since 1.3, replaced byunschedule(String, boolean, ContextInfo)voidunschedule(String changeDeployId, boolean vendorNarrowing, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts an ID for aChangeDeploythat was previously scheduled and starts the process of unscheduling the deployment.
-
Method Details
-
schedule
@Deprecated void schedule(@NonNull ChangeSummaryGroups scheduleGroups, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @NonNull String sandbox, @NonNull Instant deployTime, int level) Deprecated.since 1.3, replaced byschedule(ChangeSummaryGroups, ContextInfo, String, Instant, int, boolean)Creates a newChangeDeployfor the givenChangeSummaryGroupsand schedules it for the given deployTime. The givenChangeSummaryGroupsand theirChangeSummariesare marked with statusChangeStatusType.SCHEDULING, and aWorkflowJobSchedulingRequestis published to actually schedule the job- Parameters:
scheduleGroups- Construct that identifies one or moreChangeSummaryGroupinstances to be scheduled for a future deployment.context- Information about the deploy request containing the ID of the request's author.sandbox- The sandbox ID upon which to filter searches on when retrieving the group instances and their summaries.deployTime- Time at which to deploy the items identified by the scheduleGroups param- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operation- See Also:
-
schedule
void schedule(@NonNull ChangeSummaryGroups scheduleGroups, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @NonNull String sandbox, @NonNull Instant deployTime, int level, boolean vendorNarrowing) Creates a newChangeDeployfor the givenChangeSummaryGroupsand schedules it for the given deployTime. The givenChangeSummaryGroupsand theirChangeSummariesare marked with statusChangeStatusType.SCHEDULING, and aWorkflowJobSchedulingRequestis published to actually schedule the job- Parameters:
scheduleGroups- Construct that identifies one or moreChangeSummaryGroupinstances to be scheduled for a future deployment.context- Information about the deploy request containing the ID of the request's author.sandbox- The sandbox ID upon which to filter searches on when retrieving the group instances and their summaries.deployTime- Time at which to deploy the items identified by the scheduleGroups paramvendorNarrowing- whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operation- See Also:
-
unschedule
Deprecated.since 1.3, replaced byunschedule(String, boolean, ContextInfo)Accepts an ID for aChangeDeploythat was previously scheduled and starts the process of unscheduling the deployment. The deployment, its groups, and their associated summaries have their statuses updated toChangeStatusType.UNSCHEDULING, and aWorkflowJobUnschedulingRequestis published to actually unschedule the job.- Parameters:
changeDeployId- the ID of the previously scheduledChangeDeploywhich should be unscheduled- Throws:
QualifiedStateException- for any values determined to be in an incorrect state from what is expected to perform an unschedule operation- See Also:
-
unschedule
void unschedule(@NonNull String changeDeployId, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts an ID for aChangeDeploythat was previously scheduled and starts the process of unscheduling the deployment. The deployment, its groups, and their associated summaries have their statuses updated toChangeStatusType.UNSCHEDULING, and aWorkflowJobUnschedulingRequestis published to actually unschedule the job.- Parameters:
changeDeployId- the ID of the previously scheduledChangeDeploywhich should be unscheduledvendorNarrowing- whether to filter results based on the current authentication's vendor restrictions if vendor processing is enabledcontextInfo- context information about sandboxing and multitenant state- Throws:
QualifiedStateException- for any values determined to be in an incorrect state from what is expected to perform an unschedule operation- See Also:
-
clear
void clear(@NonNull String changeDeployId, boolean vendorNarrowing, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Accepts an ID for aChangeDeploythat previously failed and starts the process of clearing the error state of the deployment. This includes notifying (via special deployment case) all resource tier services with impacted entities. The resource tier service is responsible for rectifying theChangeDetailstate to obsolete for deployment version matches in the tracking information for affected entities.- Parameters:
changeDeployId- The ID of the previously failed deploymentvendorNarrowing- whether to filter results based on the current authentication's vendor restrictions if vendor processing is enabledcontextInfo- context information about sandboxing and multitenant state
-
deploy
@Deprecated void deploy(@NonNull ChangeSummaryGroups scheduleGroups, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @NonNull String sandbox, int level) Deprecated.since 1.3, replaced bydeploy(ChangeSummaryGroups, ContextInfo, String, int, boolean)Creates a newChangeDeployfor the givenChangeSummaryGroupsand executes immediate deployment. AWorkflowDeployRequestis emitted per change summary via the relevant Spring Cloud channel, and the givenChangeSummaryGroupsand theirChangeSummariesare marked with statusChangeStatusType.DEPLOYING.- Parameters:
scheduleGroups- Construct that identifies one or moreChangeSummaryGroupinstances to be scheduled for a future deployment.context- Information about the deploy request containing the ID of the request's author.sandbox- The sandbox ID upon which to filter searches on when retrieving the group instances and their summaries.level- The tracking level from which to perform the deployment (seeTrackingLevel)- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operation
-
deploy
void deploy(@NonNull ChangeSummaryGroups scheduleGroups, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @NonNull String sandbox, int level, boolean vendorNarrowing) Creates a newChangeDeployfor the givenChangeSummaryGroupsand executes immediate deployment. AWorkflowDeployRequestis emitted per change summary via the relevant Spring Cloud channel, and the givenChangeSummaryGroupsand theirChangeSummariesare marked with statusChangeStatusType.DEPLOYING.- Parameters:
scheduleGroups- Construct that identifies one or moreChangeSummaryGroupinstances to be scheduled for a future deployment.context- Information about the deploy request containing the ID of the request's author.sandbox- The sandbox ID upon which to filter searches on when retrieving the group instances and their summaries.level- The tracking level from which to perform the deployment (seeTrackingLevel)vendorNarrowing- whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operationChangeSummariesNotFoundException- Thrown if the change summaries cannot be found
-
deploy
@Deprecated void deploy(@NonNull ChangeSummaryGroups scheduleGroups, @NonNull Stream<ChangeSummary> summaries, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @NonNull String sandbox, int level) Deprecated.since 1.3, replaced bydeploy(ChangeSummaryGroups, Stream, ContextInfo, String, int, boolean)Creates a newChangeDeployfor the givenChangeSummaryGroupsand executes immediate deployment. AWorkflowDeployRequestis emitted per change summary via the relevant Spring Cloud channel, and the givenChangeSummaryGroupsand theirChangeSummariesare marked with statusChangeStatusType.DEPLOYING.- Parameters:
scheduleGroups- Construct that identifies one or moreChangeSummaryGroupinstances to be scheduled for a future deployment.summaries- The stream ofChangeSummaryinstances to deploy. Usually supplied as part of aTransitionRequestManager#promoteDeploy(PromoteSummaries, ContextInfo, String, boolean)style operation where user level changes are passed directly to deployment.context- Information about the deploy request containing the ID of the request's author.sandbox- The sandbox ID upon which to filter searches on when retrieving the group instances and their summaries.level- The tracking level from which to perform the deployment (seeTrackingLevel)- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operationChangeSummariesNotFoundException- Thrown if the change summaries cannot be found
-
deploy
void deploy(@NonNull ChangeSummaryGroups scheduleGroups, @NonNull Stream<ChangeSummary> summaries, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @NonNull String sandbox, int level, boolean vendorNarrowing) Creates a newChangeDeployfor the givenChangeSummaryGroupsand executes immediate deployment. AWorkflowDeployRequestis emitted per change summary via the relevant Spring Cloud channel, and the givenChangeSummaryGroupsand theirChangeSummariesare marked with statusChangeStatusType.DEPLOYING.- Parameters:
scheduleGroups- Construct that identifies one or moreChangeSummaryGroupinstances to be scheduled for a future deployment.summaries- The stream ofChangeSummaryinstances to deploy. Usually supplied as part of aTransitionRequestManager#promoteDeploy(PromoteSummaries, ContextInfo, String, boolean)style operation where user level changes are passed directly to deployment.context- Information about the deploy request containing the ID of the request's author.sandbox- The sandbox ID upon which to filter searches on when retrieving the group instances and their summaries.level- The tracking level from which to perform the deployment (seeTrackingLevel)vendorNarrowing- whether or not to filter results based on the current authentication's vendor restrictions if vendor processing is enabled- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operationChangeSummariesNotFoundException- Thrown if the change summaries cannot be found
-
executeDeployment
Finds an existing, previously scheduledChangeDeployand sends out aWorkflowDeployRequestperChangeSummaryin the deployment via the relevant Spring Cloud channel. It will also mark the deployment'sChangeSummaryGroupsandChangeSummarieswith statusChangeStatusType.DEPLOYING.- Parameters:
deployId- Id of an existing, scheduledChangeDeploy.- Throws:
QualifiedStateException- Thrown for any id values determined to be in an incorrect state from that expected to perform a transition operationChangeSummariesNotFoundException- Thrown if the change summaries cannot be found
-
deploy(ChangeSummaryGroups, ContextInfo, String, int, boolean)