Class AfterSuccessfulStageTriggerConfigurator
java.lang.Object
com.atlassian.bamboo.trigger.environment.AbstractEnvironmentTriggerConfigurator
com.atlassian.bamboo.trigger.dependency.AfterSuccessfulStageTriggerConfigurator
- All Implemented Interfaces:
PlanAwareEnvironmentTriggerConfigurator,TriggerConfigurator
public class AfterSuccessfulStageTriggerConfigurator
extends AbstractEnvironmentTriggerConfigurator
implements PlanAwareEnvironmentTriggerConfigurator
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.trigger.TriggerConfigurator
TriggerConfigurator.RepositorySelectionMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.atlassian.bamboo.trigger.environment.AbstractEnvironmentTriggerConfigurator
cachedPlanManager, CFG_BRANCH_NAME, CFG_BRANCH_SELECTION_OPTIONS, CFG_PLAN_HAS_MULTIPLE_BRANCHES, CFG_TRIGGERING_PLAN, CFG_TRIGGERING_PLAN_MATCHES_DEPLOYMENT, DEPLOYMENT_PROJECT, ENVIRONMENT, ENVIRONMENT_ID, i18nResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateTriggerConfigMap(@NotNull ActionParametersMap actionParametersMap, @Nullable TriggerDefinition previousTriggerDefinition) booleanisAffectedByPlanDeletion(@NotNull PlanKey deletedPlanKey, @NotNull TriggerDefinition triggerDefinition) Check if trigger will be affected when Plan is deleted.voidonDeploymentProjectPlanUpdate(@Nullable ImmutableChain oldPlan, @NotNull ImmutableChain newPlan, @NotNull TriggerDefinition triggerDefinition) Update trigger definition when plan related to deployment is changed.voidpopulateContextForCreate(@NotNull Map<String, Object> context) voidpopulateContextForEdit(@NotNull Map<String, Object> context, @NotNull TriggerDefinition triggerDefinition) voidpopulateContextForView(@NotNull Map<String, Object> context, @NotNull TriggerDefinition triggerDefinition) booleanupdatePlanKey(@NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey, @NotNull TriggerDefinition triggerDefinition) Change plan key referenced by a trigger.voidvalidate(@NotNull ActionParametersMap actionParametersMap, @NotNull ErrorCollection errorCollection) voidvalidateDeploymentProjectPlanUpdate(@Nullable ImmutableChain oldPlan, @NotNull ImmutableChain newPlan, @NotNull Environment environment, @NotNull List<EnvironmentTriggerValidationError> triggerValidationErrors, @NotNull TriggerDefinition triggerDefinition) Validate change of plan deployment is related to.Methods inherited from class com.atlassian.bamboo.trigger.environment.AbstractEnvironmentTriggerConfigurator
getBranchName, getRepositorySelectionMode, hasDeploymentProjectPlanMultipleBranches, hasTheSameMasterPlanAsDeploymentProject, populateContextWithBranchControlVariablesForDeployments, setCachedPlanManager, setCustomVariableContext, setI18nResolver, setUiConfigSupportMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.trigger.TriggerConfigurator
getRepositorySelectionMode, isRepositorySelectable
-
Field Details
-
CFG_BRANCH_SELECTION_MODE
- See Also:
-
CFG_TRIGGERING_PLAN_KEY
- See Also:
-
CFG_TRIGGERING_BRANCH_KEY
- See Also:
-
CFG_TRIGGERING_STAGE_KEY
- See Also:
-
-
Constructor Details
-
AfterSuccessfulStageTriggerConfigurator
public AfterSuccessfulStageTriggerConfigurator()
-
-
Method Details
-
populateContextForCreate
- Specified by:
populateContextForCreatein interfaceTriggerConfigurator
-
populateContextForEdit
public void populateContextForEdit(@NotNull @NotNull Map<String, Object> context, @NotNull @NotNull TriggerDefinition triggerDefinition) - Specified by:
populateContextForEditin interfaceTriggerConfigurator
-
populateContextForView
public void populateContextForView(@NotNull @NotNull Map<String, Object> context, @NotNull @NotNull TriggerDefinition triggerDefinition) - Specified by:
populateContextForViewin interfaceTriggerConfigurator
-
validate
public void validate(@NotNull @NotNull ActionParametersMap actionParametersMap, @NotNull @NotNull ErrorCollection errorCollection) - Specified by:
validatein interfaceTriggerConfigurator
-
generateTriggerConfigMap
@NotNull public @NotNull Map<String,String> generateTriggerConfigMap(@NotNull @NotNull ActionParametersMap actionParametersMap, @Nullable @Nullable TriggerDefinition previousTriggerDefinition) - Specified by:
generateTriggerConfigMapin interfaceTriggerConfigurator
-
validateDeploymentProjectPlanUpdate
public void validateDeploymentProjectPlanUpdate(@Nullable @Nullable ImmutableChain oldPlan, @NotNull @NotNull ImmutableChain newPlan, @NotNull @NotNull Environment environment, @NotNull @NotNull List<EnvironmentTriggerValidationError> triggerValidationErrors, @NotNull @NotNull TriggerDefinition triggerDefinition) Description copied from interface:PlanAwareEnvironmentTriggerConfiguratorValidate change of plan deployment is related to.- Specified by:
validateDeploymentProjectPlanUpdatein interfacePlanAwareEnvironmentTriggerConfigurator- Parameters:
oldPlan-newPlan-environment-triggerValidationErrors-triggerDefinition-
-
onDeploymentProjectPlanUpdate
public void onDeploymentProjectPlanUpdate(@Nullable @Nullable ImmutableChain oldPlan, @NotNull @NotNull ImmutableChain newPlan, @NotNull @NotNull TriggerDefinition triggerDefinition) Description copied from interface:PlanAwareEnvironmentTriggerConfiguratorUpdate trigger definition when plan related to deployment is changed.- Specified by:
onDeploymentProjectPlanUpdatein interfacePlanAwareEnvironmentTriggerConfigurator
-
updatePlanKey
public boolean updatePlanKey(@NotNull @NotNull PlanKey originalPlanKey, @NotNull @NotNull PlanKey newPlanKey, @NotNull @NotNull TriggerDefinition triggerDefinition) Description copied from interface:PlanAwareEnvironmentTriggerConfiguratorChange plan key referenced by a trigger. Used in case of plan key change (e.g. plan being moved)- Specified by:
updatePlanKeyin interfacePlanAwareEnvironmentTriggerConfigurator- Parameters:
originalPlanKey- original value of plan keynewPlanKey- new value of plan key- Returns:
- true iff a change in configuration was performed
-
isAffectedByPlanDeletion
public boolean isAffectedByPlanDeletion(@NotNull @NotNull PlanKey deletedPlanKey, @NotNull @NotNull TriggerDefinition triggerDefinition) Description copied from interface:PlanAwareEnvironmentTriggerConfiguratorCheck if trigger will be affected when Plan is deleted.- Specified by:
isAffectedByPlanDeletionin interfacePlanAwareEnvironmentTriggerConfigurator- Parameters:
deletedPlanKey- key of Plan that was deleted- Returns:
- true if action needs to be taken when Plan is deleted
-