Class TriggerConfigurationUtils


  • @Internal
    public class TriggerConfigurationUtils
    extends Object
    • Method Detail

      • 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

        @NotNull
        public static @NotNull Set<Long> extractTriggeringRepositoriesFromCfgString​(@NotNull
                                                                                    @NotNull String triggeringRepositoriesString)
      • triggeringRepositoriesToString

        @NotNull
        public static @NotNull String triggeringRepositoriesToString​(@NotNull
                                                                     @NotNull Set<Long> triggeringRepositories)
      • getUniqueId

        public static long getUniqueId​(@NotNull
                                       @NotNull List<TriggerDefinition> triggers)
        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

        public static Map<String,​String> extractTriggerConditionConfiguration​(org.apache.commons.configuration.HierarchicalConfiguration configuration)