Class CronTriggerConfigurator
java.lang.Object
com.atlassian.bamboo.trigger.environment.AbstractEnvironmentTriggerConfigurator
com.atlassian.bamboo.trigger.cron.CronTriggerConfigurator
- All Implemented Interfaces:
PlanAwareEnvironmentTriggerConfigurator
,TriggerConfigurator
public class CronTriggerConfigurator
extends AbstractEnvironmentTriggerConfigurator
implements PlanAwareEnvironmentTriggerConfigurator
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.bamboo.trigger.TriggerConfigurator
TriggerConfigurator.RepositorySelectionMode
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptiongenerateTriggerConfigMap
(@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) void
setSalUserManager
(com.atlassian.sal.api.user.UserManager salUserManager) Deprecated.since 6.8 use constructor injection or annotation injectionboolean
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
-
Constructor Details
-
CronTriggerConfigurator
public CronTriggerConfigurator()
-
-
Method Details
-
populateContextForCreate
- 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
-
getDeploymentTriggerBranchSelectionMode
public static DeploymentTriggerBranchSelectionMode getDeploymentTriggerBranchSelectionMode(Map<String, String> config) -
setSalUserManager
Deprecated.since 6.8 use constructor injection or annotation injection
-