@Internal public class TriggerConfigurationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONDITIONS |
static String |
CONFIG |
static String |
IS_ENABLED |
static String |
ITEM |
static String |
NAME |
static String |
PLUGIN_KEY |
static String |
TRIGGER_CONFIG_ROOT |
static String |
TRIGGER_DEF_PREFIX |
static String |
TRIGGER_DEFINITION |
static String |
TRIGGER_PREFIX |
static String |
TRIGGERING_REPOSITORIES |
static String |
TRIGGERS_DEFINED |
static String |
USER_DESCRIPTION |
Modifier and Type | Method and Description |
---|---|
static void |
addTriggerDefinitionsToConfig(Iterable<TriggerDefinition> triggerDefinitions,
org.apache.commons.configuration.HierarchicalConfiguration config)
Adds tasks to a build configuration
|
static Map<String,String> |
extractTriggerConditionConfiguration(org.apache.commons.configuration.HierarchicalConfiguration configuration) |
static Set<Long> |
extractTriggeringRepositoriesFromCfgString(String triggeringRepositoriesString) |
static TriggerDefinition |
getTriggerDefinitionById(Iterable<TriggerDefinition> triggers,
long id) |
static com.google.common.collect.ImmutableList<TriggerDefinition> |
getTriggerDefinitionsFromConfig(org.apache.commons.configuration.HierarchicalConfiguration fromConfig)
Retrieves tasks from build configuration
|
static com.google.common.collect.ImmutableList<TriggerDefinition> |
getTriggerDefinitionsFromConfigNotNull(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration) |
static long |
getUniqueId(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 configuration
|
static void |
triggerConditionsToConfiguration(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration,
TriggerDefinition triggerDefinition) |
static String |
triggeringRepositoriesToString(Set<Long> triggeringRepositories) |
static void |
updateRepositoryIdsInTriggers(List<TriggerDefinition> triggers,
Map<Long,Long> repositoryIdsChanges) |
public static final String TRIGGER_CONFIG_ROOT
public static final String TRIGGER_PREFIX
public static final String TRIGGERS_DEFINED
public static final String TRIGGERING_REPOSITORIES
public static final String NAME
public static final String PLUGIN_KEY
public static final String USER_DESCRIPTION
public static final String IS_ENABLED
public static final String CONFIG
public static final String ITEM
public static final String CONDITIONS
public static final String TRIGGER_DEFINITION
public static final String TRIGGER_DEF_PREFIX
public static void removeTriggersFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
config
- public static void addTriggerDefinitionsToConfig(@Nullable Iterable<TriggerDefinition> triggerDefinitions, @NotNull org.apache.commons.configuration.HierarchicalConfiguration config)
triggerDefinitions
- config
- @Nullable public static com.google.common.collect.ImmutableList<TriggerDefinition> getTriggerDefinitionsFromConfig(org.apache.commons.configuration.HierarchicalConfiguration fromConfig)
fromConfig
- @NotNull public static Set<Long> extractTriggeringRepositoriesFromCfgString(@NotNull String triggeringRepositoriesString)
@NotNull public static String triggeringRepositoriesToString(@NotNull Set<Long> triggeringRepositories)
@Nullable public static TriggerDefinition getTriggerDefinitionById(@NotNull Iterable<TriggerDefinition> triggers, long id)
public static long getUniqueId(@NotNull List<TriggerDefinition> triggers)
triggers
- @NotNull public static com.google.common.collect.ImmutableList<TriggerDefinition> getTriggerDefinitionsFromConfigNotNull(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration)
public static void updateRepositoryIdsInTriggers(List<TriggerDefinition> triggers, Map<Long,Long> repositoryIdsChanges)
public static void removeRepositoryIdsFromTriggers(List<TriggerDefinition> triggers, Set<Long> removedRepositoryIds)
public static void triggerConditionsToConfiguration(org.apache.commons.configuration.HierarchicalConfiguration buildConfiguration, TriggerDefinition triggerDefinition)
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.