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
Fields Modifier and Type Field Description static String
CFG_BRANCH_SELECTION_MODE
static String
CFG_TRIGGERING_BRANCH_KEY
static String
CFG_TRIGGERING_PLAN_KEY
static String
CFG_TRIGGERING_STAGE_KEY
-
Fields 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 Constructor Description AfterSuccessfulStageTriggerConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Map<String,String>
generateTriggerConfigMap(@NotNull ActionParametersMap actionParametersMap, @Nullable TriggerDefinition previousTriggerDefinition)
boolean
isAffectedByPlanDeletion(@NotNull PlanKey deletedPlanKey, @NotNull TriggerDefinition triggerDefinition)
Check if trigger will be affected when Plan is deleted.void
onDeploymentProjectPlanUpdate(@Nullable ImmutableChain oldPlan, @NotNull ImmutableChain newPlan, @NotNull TriggerDefinition triggerDefinition)
Update trigger definition when plan related to deployment is changed.void
populateContextForCreate(@NotNull Map<String,Object> context)
void
populateContextForEdit(@NotNull Map<String,Object> context, @NotNull TriggerDefinition triggerDefinition)
void
populateContextForView(@NotNull Map<String,Object> context, @NotNull TriggerDefinition triggerDefinition)
boolean
updatePlanKey(@NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey, @NotNull TriggerDefinition triggerDefinition)
Change plan key referenced by a trigger.void
validate(@NotNull ActionParametersMap actionParametersMap, @NotNull ErrorCollection errorCollection)
void
validateDeploymentProjectPlanUpdate(@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, setUiConfigSupport
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.trigger.TriggerConfigurator
getRepositorySelectionMode, isRepositorySelectable
-
-
-
-
Field Detail
-
CFG_BRANCH_SELECTION_MODE
public static final String CFG_BRANCH_SELECTION_MODE
- See Also:
- Constant Field Values
-
CFG_TRIGGERING_PLAN_KEY
public static final String CFG_TRIGGERING_PLAN_KEY
- See Also:
- Constant Field Values
-
CFG_TRIGGERING_BRANCH_KEY
public static final String CFG_TRIGGERING_BRANCH_KEY
- See Also:
- Constant Field Values
-
CFG_TRIGGERING_STAGE_KEY
public static final String CFG_TRIGGERING_STAGE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
populateContextForCreate
public void populateContextForCreate(@NotNull @NotNull Map<String,Object> context)
- Specified by:
populateContextForCreate
in interfaceTriggerConfigurator
-
populateContextForEdit
public void populateContextForEdit(@NotNull @NotNull Map<String,Object> context, @NotNull @NotNull TriggerDefinition triggerDefinition)
- Specified by:
populateContextForEdit
in interfaceTriggerConfigurator
-
populateContextForView
public void populateContextForView(@NotNull @NotNull Map<String,Object> context, @NotNull @NotNull TriggerDefinition triggerDefinition)
- Specified by:
populateContextForView
in interfaceTriggerConfigurator
-
validate
public void validate(@NotNull @NotNull ActionParametersMap actionParametersMap, @NotNull @NotNull ErrorCollection errorCollection)
- Specified by:
validate
in interfaceTriggerConfigurator
-
generateTriggerConfigMap
@NotNull public @NotNull Map<String,String> generateTriggerConfigMap(@NotNull @NotNull ActionParametersMap actionParametersMap, @Nullable @Nullable TriggerDefinition previousTriggerDefinition)
- Specified by:
generateTriggerConfigMap
in 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:PlanAwareEnvironmentTriggerConfigurator
Validate change of plan deployment is related to.- Specified by:
validateDeploymentProjectPlanUpdate
in interfacePlanAwareEnvironmentTriggerConfigurator
-
onDeploymentProjectPlanUpdate
public void onDeploymentProjectPlanUpdate(@Nullable @Nullable ImmutableChain oldPlan, @NotNull @NotNull ImmutableChain newPlan, @NotNull @NotNull TriggerDefinition triggerDefinition)
Description copied from interface:PlanAwareEnvironmentTriggerConfigurator
Update trigger definition when plan related to deployment is changed.- Specified by:
onDeploymentProjectPlanUpdate
in interfacePlanAwareEnvironmentTriggerConfigurator
-
updatePlanKey
public boolean updatePlanKey(@NotNull @NotNull PlanKey originalPlanKey, @NotNull @NotNull PlanKey newPlanKey, @NotNull @NotNull TriggerDefinition triggerDefinition)
Description copied from interface:PlanAwareEnvironmentTriggerConfigurator
Change plan key referenced by a trigger. Used in case of plan key change (e.g. plan being moved)- Specified by:
updatePlanKey
in 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:PlanAwareEnvironmentTriggerConfigurator
Check if trigger will be affected when Plan is deleted.- Specified by:
isAffectedByPlanDeletion
in interfacePlanAwareEnvironmentTriggerConfigurator
- Parameters:
deletedPlanKey
- key of Plan that was deleted- Returns:
- true if action needs to be taken when Plan is deleted
-
-