public class TriggerConfigurationServiceImpl extends Object implements TriggerConfigurationService
NEW_REPOSITORY_INDICATOR| Constructor and Description |
|---|
TriggerConfigurationServiceImpl(BuildDefinitionManager buildDefinitionManager,
com.opensymphony.xwork2.TextProvider textProvider,
PlanManager planManager,
AuditLogService auditLogService,
ScopedExclusionService scopedExclusionService) |
| 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 triggerDescriptor,
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.
|
public TriggerConfigurationServiceImpl(@NotNull
BuildDefinitionManager buildDefinitionManager,
@NotNull
com.opensymphony.xwork2.TextProvider textProvider,
@NotNull
PlanManager planManager,
@NotNull
AuditLogService auditLogService,
@NotNull
ScopedExclusionService scopedExclusionService)
public TriggerDefinition createTrigger(@NotNull PlanKey planKey, @NotNull TriggerModuleDescriptor triggerDescriptor, @NotNull String userDescription, boolean isEnabled, @Nullable Set<Long> triggeringRepositories, @NotNull Map<String,String> configuration, @NotNull Map<String,String> triggerConditionsConfiguration) throws IllegalArgumentException
TriggerConfigurationServicecreateTrigger in interface TriggerConfigurationServiceplanKey - of the plan to add the trigger definition to, plan should be TriggerabletriggerDescriptor - 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)public void deleteTrigger(@NotNull
PlanKey planKey,
long triggerId)
throws IllegalArgumentException,
IllegalStateException
TriggerConfigurationServicedeleteTrigger in interface TriggerConfigurationServiceplanKey - 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.public 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
TriggerConfigurationServiceeditTrigger in interface TriggerConfigurationServiceplanKey - - 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.public void createTriggerList(PlanKey planKey, @NotNull List<TriggerDefinition> triggerDefinitions)
TriggerConfigurationServicecreateTriggerList in interface TriggerConfigurationServiceplanKey - - the plan the task list belongs totriggerDefinitions - - list of the tasks to be addedpublic void addTriggeringRepository(@NotNull
Chain chain,
long repositoryId)
TriggerConfigurationServiceaddTriggeringRepository in interface TriggerConfigurationServicepublic void updateRepositoryIdsInTriggers(@NotNull
Chain chain,
Map<Long,Long> repositoryIdsChanges)
TriggerConfigurationServiceupdateRepositoryIdsInTriggers in interface TriggerConfigurationServicerepositoryIdsChanges - mapping between old and new repositories idspublic void updateRepositoryIdsInTriggers(@NotNull
Chain chain,
Map<Long,Long> repositoryIdsChanges,
boolean reactivateTriggers)
TriggerConfigurationServiceupdateRepositoryIdsInTriggers in interface TriggerConfigurationServicerepositoryIdsChanges - mapping between old and new repositories idsreactivateTriggers - indicates if triggers need to be (re)activatedpublic void removeRepositoryIdsFromTriggers(@NotNull
Chain chain,
Set<Long> removedRepositoriesIds)
TriggerConfigurationServiceremoveRepositoryIdsFromTriggers in interface TriggerConfigurationServiceCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.