Class StashTriggerConfigurator
- java.lang.Object
-
- com.atlassian.bamboo.plugins.stash.trigger.StashTriggerConfigurator
-
- All Implemented Interfaces:
TriggerConfigurator
public class StashTriggerConfigurator extends Object implements TriggerConfigurator
-
-
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 com.google.common.base.Predicate<TriggerDefinition>
IS_ACTIVE_STASH_TRIGGER
Deprecated.since 5.10 use method reference toisActiveStashTrigger(TriggerDefinition)
static String
PLUGIN_KEY
-
Constructor Summary
Constructors Constructor Description StashTriggerConfigurator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Map<String,String>
generateTriggerConfigMap(@NotNull ActionParametersMap actionParametersMap, @Nullable TriggerDefinition previousTriggerDefinition)
@NotNull TriggerConfigurator.RepositorySelectionMode
getRepositorySelectionMode()
ReturnTriggerConfigurator.RepositorySelectionMode
that is correct for the trigger.static boolean
isActiveStashTrigger(@NotNull TriggerDefinition triggerDefinition)
boolean
isRepositorySelectable(@NotNull PlanRepositoryDefinition planRepositoryDefinition)
Allows to filter repositories allowed to be selected by trigger from the list of repositories available for plan.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
validate(@NotNull ActionParametersMap actionParametersMap, @NotNull ErrorCollection errorCollection)
-
-
-
Field Detail
-
PLUGIN_KEY
public static final String PLUGIN_KEY
- See Also:
- Constant Field Values
-
IS_ACTIVE_STASH_TRIGGER
@Deprecated public static final com.google.common.base.Predicate<TriggerDefinition> IS_ACTIVE_STASH_TRIGGER
Deprecated.since 5.10 use method reference toisActiveStashTrigger(TriggerDefinition)
-
-
Method Detail
-
isActiveStashTrigger
public static boolean isActiveStashTrigger(@NotNull @NotNull TriggerDefinition triggerDefinition)
-
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
-
getRepositorySelectionMode
@NotNull public @NotNull TriggerConfigurator.RepositorySelectionMode getRepositorySelectionMode()
Description copied from interface:TriggerConfigurator
ReturnTriggerConfigurator.RepositorySelectionMode
that is correct for the trigger. Depending on result, proper UI will be rendered and appropriate data will be available when calling toTriggerDefinition.getTriggeringRepositories()
- Specified by:
getRepositorySelectionMode
in interfaceTriggerConfigurator
- Returns:
-
isRepositorySelectable
public boolean isRepositorySelectable(@NotNull @NotNull PlanRepositoryDefinition planRepositoryDefinition)
Description copied from interface:TriggerConfigurator
Allows to filter repositories allowed to be selected by trigger from the list of repositories available for plan.- Specified by:
isRepositorySelectable
in interfaceTriggerConfigurator
-
-