Package com.atlassian.bamboo.trigger
Class TriggerConfigurationUtils
java.lang.Object
com.atlassian.bamboo.trigger.TriggerConfigurationUtils
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final long
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addTriggerDefinitionsToConfig
(@Nullable Iterable<TriggerDefinition> triggerDefinitions, @NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Adds tasks to a build configurationextractTriggerConditionConfiguration
(org.apache.commons.configuration.HierarchicalConfiguration configuration) extractTriggeringRepositoriesFromCfgString
(@NotNull String triggeringRepositoriesString) static @Nullable TriggerDefinition
getTriggerDefinitionById
(@NotNull Iterable<TriggerDefinition> triggers, long id) static @Nullable com.google.common.collect.ImmutableList<TriggerDefinition>
getTriggerDefinitionsFromConfig
(org.apache.commons.configuration.HierarchicalConfiguration fromConfig) Retrieves tasks from build configurationstatic @NotNull com.google.common.collect.ImmutableList<TriggerDefinition>
getTriggerDefinitionsFromConfigNotNull
(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) static long
getUniqueId
(@NotNull List<TriggerDefinition> triggers) Returns id of trigger that is not used in provided list.static void
removeRepositoryIdsFromTriggers
(List<TriggerDefinition> triggers, Set<Long> removedRepositoryIds) static void
removeTriggersFromConfig
(org.apache.commons.configuration.HierarchicalConfiguration config) Removes all tasks from build configurationstatic void
triggerConditionsToConfiguration
(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration, TriggerDefinition triggerDefinition) static @NotNull String
triggeringRepositoriesToString
(@NotNull Set<Long> triggeringRepositories) static void
updateRepositoryIdsInTriggers
(List<TriggerDefinition> triggers, Map<Long, Long> repositoryIdsChanges)
-
Field Details
-
TRIGGER_CONFIG_ROOT
- See Also:
-
TRIGGER_PREFIX
- See Also:
-
TRIGGERS_DEFINED
- See Also:
-
TRIGGERING_REPOSITORIES
- See Also:
-
NAME
- See Also:
-
PLUGIN_KEY
- See Also:
-
USER_DESCRIPTION
- See Also:
-
IS_ENABLED
- See Also:
-
CONFIG
- See Also:
-
ITEM
- See Also:
-
CONDITIONS
- See Also:
-
TRIGGER_DEFINITION
- See Also:
-
TRIGGER_DEF_PREFIX
- See Also:
-
INITIAL_TRIGGER_ID
public static final long INITIAL_TRIGGER_ID- See Also:
-
-
Method Details
-
removeTriggersFromConfig
public static void removeTriggersFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config) Removes all tasks from build configuration- Parameters:
config
-
-
addTriggerDefinitionsToConfig
public static void addTriggerDefinitionsToConfig(@Nullable @Nullable Iterable<TriggerDefinition> triggerDefinitions, @NotNull @NotNull org.apache.commons.configuration.HierarchicalConfiguration config) Adds tasks to a build configuration- Parameters:
triggerDefinitions
-config
-
-
getTriggerDefinitionsFromConfig
@Nullable public static @Nullable com.google.common.collect.ImmutableList<TriggerDefinition> getTriggerDefinitionsFromConfig(org.apache.commons.configuration.HierarchicalConfiguration fromConfig) Retrieves tasks from build configuration- Parameters:
fromConfig
-- Returns:
-
extractTriggeringRepositoriesFromCfgString
-
triggeringRepositoriesToString
-
getTriggerDefinitionById
@Nullable public static @Nullable TriggerDefinition getTriggerDefinitionById(@NotNull @NotNull Iterable<TriggerDefinition> triggers, long id) -
getUniqueId
Returns id of trigger that is not used in provided list.- Parameters:
triggers
-- Returns:
-
getTriggerDefinitionsFromConfigNotNull
@NotNull public static @NotNull com.google.common.collect.ImmutableList<TriggerDefinition> getTriggerDefinitionsFromConfigNotNull(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) -
updateRepositoryIdsInTriggers
public static void updateRepositoryIdsInTriggers(List<TriggerDefinition> triggers, Map<Long, Long> repositoryIdsChanges) -
removeRepositoryIdsFromTriggers
public static void removeRepositoryIdsFromTriggers(List<TriggerDefinition> triggers, Set<Long> removedRepositoryIds) -
triggerConditionsToConfiguration
public static void triggerConditionsToConfiguration(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration, TriggerDefinition triggerDefinition) -
extractTriggerConditionConfiguration
-