@Internal
public interface TriggerConfigurationService
Modifier and Type | Field and Description |
---|---|
static long |
NEW_REPOSITORY_INDICATOR |
Modifier and Type | Method and Description |
---|---|
void |
addTriggeringRepository(Chain chain,
long repositoryId)
Updates all repository aware triggers of Chain by adding a new repository.
|
TriggerDefinition |
createTrigger(PlanKey planKey,
TriggerModuleDescriptor triggerModuleDescriptor,
String userDescription,
boolean isEnabled,
Set<Long> triggeringRepositories,
Map<String,String> configuration,
Map<String,String> triggerConditionsConfiguration)
Create a trigger Definition and save it against the plan
|
void |
createTriggerList(PlanKey planKey,
List<TriggerDefinition> triggerDefinitions)
Initializes trigger list of a plan with the provided list.
|
void |
deleteTrigger(PlanKey planKey,
long triggerId)
Delete a given trigger Definition
|
TriggerDefinition |
editTrigger(PlanKey planKey,
long triggerId,
String userDescription,
boolean isEnabled,
Set<Long> triggeringRepositories,
Map<String,String> triggerConfigurationMap,
Map<String,String> triggerConditionsConfiguration)
Update the details of specific triggerDefinition
|
void |
removeRepositoryIdsFromTriggers(Chain chain,
Set<Long> removedRepositoriesIds)
Removes listed repository ids from chain's triggers
|
void |
updateRepositoryIdsInTriggers(Chain chain,
Map<Long,Long> repositoryIdsChanges)
Updates Chain configurations affected by repository edition.
|
void |
updateRepositoryIdsInTriggers(Chain chain,
Map<Long,Long> repositoryIdsChanges,
boolean reactivateTriggers)
Updates Chain configurations affected by repository edition.
|
static final long NEW_REPOSITORY_INDICATOR
TriggerDefinition createTrigger(@NotNull PlanKey planKey, @NotNull TriggerModuleDescriptor triggerModuleDescriptor, @Nullable String userDescription, boolean isEnabled, @Nullable Set<Long> triggeringRepositories, @NotNull Map<String,String> configuration, @NotNull Map<String,String> triggerConditionsConfiguration) throws IllegalArgumentException
planKey
- of the plan to add the trigger definition to, plan should be Triggerable
triggerModuleDescriptor
- for the TriggerDefinition to be addeduserDescription
- description the user has specified for this TriggerDefinitionisEnabled
- - set enabled/disabled state of the newly created triggertriggeringRepositories
- - ids of repositories relevant to this triggerconfiguration
- configuration from the plugin for this TriggerDefinitiontriggerConditionsConfiguration
- - configuration for BuildTriggerCondition
pluginsTriggerDefinition
createdIllegalArgumentException
- if planKey is invalid (e.g. doesn't exist or is not a buildable)void deleteTrigger(@NotNull PlanKey planKey, long triggerId) throws IllegalArgumentException, IllegalStateException
planKey
- for the plan to delete the TriggerDefinition fromtriggerId
- of the TriggerDefinition to delete.IllegalArgumentException
- if planKey is invalid (e.g. doesn't exist or is not a buildable),IllegalStateException
- if the task list has changed since submitting request, i.e the task isn't there to delete anymore.TriggerDefinition editTrigger(@NotNull PlanKey planKey, long triggerId, @Nullable String userDescription, boolean isEnabled, @Nullable Set<Long> triggeringRepositories, @NotNull Map<String,String> triggerConfigurationMap, @NotNull Map<String,String> triggerConditionsConfiguration) throws IllegalArgumentException
planKey
- - the plan the triggerDefinition belongs to, must be Triggerable
triggerId
- - the TriggerDefinition to edituserDescription
- - new user descriptionisEnabled
- - set new enabled/disabled statetriggeringRepositories
- - ids of repositories relevant to this triggertriggerConfigurationMap
- - new task ConfigurationtriggerConditionsConfiguration
- - configuration for BuildTriggerCondition
pluginsTriggerDefinition
with updates.IllegalArgumentException
- if planKey or triggerId is invalid.void createTriggerList(PlanKey planKey, @NotNull List<TriggerDefinition> triggerDefinitions)
planKey
- - the plan the task list belongs totriggerDefinitions
- - list of the tasks to be addedIllegalArgumentException
- if plan does not existvoid updateRepositoryIdsInTriggers(@NotNull Chain chain, Map<Long,Long> repositoryIdsChanges)
chain
- repositoryIdsChanges
- mapping between old and new repositories idsvoid updateRepositoryIdsInTriggers(@NotNull Chain chain, Map<Long,Long> repositoryIdsChanges, boolean reactivateTriggers)
chain
- repositoryIdsChanges
- mapping between old and new repositories idsreactivateTriggers
- indicates if triggers need to be (re)activatedvoid addTriggeringRepository(@NotNull Chain chain, long repositoryId)
chain
- repositoryId
- Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.