@Internal
public interface TriggerConfigurationService
| Modifier and Type | Field and Description |
|---|---|
static long |
NEW_REPOSITORY_INDICATOR |
| Modifier and Type | Method and Description |
|---|---|
void |
addTriggeringRepository(@NotNull Chain chain,
long repositoryId)
Updates all repository aware triggers of Chain by adding a new repository.
|
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)
Create a trigger Definition and save it against the plan
|
void |
createTriggerList(PlanKey planKey,
@NotNull List<TriggerDefinition> triggerDefinitions)
Initializes trigger list of a plan with the provided list.
|
void |
deleteTrigger(@NotNull PlanKey planKey,
long triggerId)
Delete a given trigger Definition
|
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)
Update the details of specific triggerDefinition
|
void |
removeRepositoryIdsFromTriggers(@NotNull Chain chain,
@NotNull Set<Long> removedRepositoriesIds)
Removes listed repository ids from chain's triggers
|
void |
updateRepositoryIdsInTriggers(@NotNull Chain chain,
Map<Long,Long> repositoryIdsChanges)
Updates Chain configurations affected by repository edition.
|
void |
updateRepositoryIdsInTriggers(@NotNull Chain chain,
Map<Long,Long> repositoryIdsChanges,
boolean reactivateTriggers)
Updates Chain configurations affected by repository edition.
|
static final long NEW_REPOSITORY_INDICATOR
TriggerDefinition createTrigger(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull TriggerModuleDescriptor triggerModuleDescriptor, @Nullable @Nullable String userDescription, boolean isEnabled, @Nullable @Nullable Set<Long> triggeringRepositories, @NotNull @NotNull Map<String,String> configuration, @NotNull @NotNull Map<String,String> triggerConditionsConfiguration) throws IllegalArgumentException
planKey - of the plan to add the trigger definition to, plan should be TriggerabletriggerModuleDescriptor - 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
@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 @NotNull PlanKey planKey, long triggerId, @Nullable @Nullable String userDescription, boolean isEnabled, @Nullable @Nullable Set<Long> triggeringRepositories, @NotNull @NotNull Map<String,String> triggerConfigurationMap, @NotNull @NotNull Map<String,String> triggerConditionsConfiguration) throws IllegalArgumentException
planKey - - the plan the triggerDefinition belongs to, must be TriggerabletriggerId - - 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 @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
@NotNull Chain chain,
Map<Long,Long> repositoryIdsChanges)
chain - repositoryIdsChanges - mapping between old and new repositories idsvoid updateRepositoryIdsInTriggers(@NotNull
@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
@NotNull Chain chain,
long repositoryId)
chain - repositoryId - Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.