@Internal
public interface TaskConfigurationService
| Modifier and Type | Method and Description |
|---|---|
TaskDefinition |
createTask(PlanKey planKey,
TaskModuleDescriptor taskDescriptor,
String userDescription,
boolean isEnabled,
Map<String,String> configuration,
TaskRootDirectorySelector taskRootDirectorySelector)
Create a task Definition and save it against the plan
|
void |
createTaskList(PlanKey planKey,
List<TaskDefinition> taskDefinitions)
Initializes task list of a plan with the provided list.
|
void |
deleteTask(PlanKey planKey,
long taskId)
Delete a given taskDefinition
|
TaskDefinition |
editTask(PlanKey planKey,
long taskId,
String userDescription,
boolean isEnabled,
Map<String,String> taskConfigurationMap,
TaskRootDirectorySelector taskRootDirectorySelector)
Update the details of specific taskDefinition
|
List<TaskDefinition> |
getRelevantTasksForRepositoryId(ImmutableJob job,
long repositoryId)
Return relevant
TaskDefinition for given Job and repositoryId |
Collection<Requirement> |
getTasksRequirements(PlanKey planKey)
|
void |
moveFinalBar(PlanKey planKey,
long beforeId,
long afterId)
Moves the final Bar to a specific location in the list.
|
void |
moveTask(PlanKey planKey,
long taskId,
long beforeId,
long afterId,
boolean isFinal)
Move a taskDefinition from one spot in its list, to another.
|
TaskDefinition |
setTaskState(PlanKey planKey,
long taskId,
boolean isEnabled)
Update the disable state of specific taskDefinition
|
void |
updateRepositoryIdsInJobsTasks(Job job,
Map<Long,Long> repositoryIdsChanges)
Updates task configurations affected by repository edition.
|
TaskDefinition createTask(@NotNull PlanKey planKey, @NotNull TaskModuleDescriptor taskDescriptor, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> configuration, @NotNull TaskRootDirectorySelector taskRootDirectorySelector) throws IllegalArgumentException
planKey - of the plan to add the taskDefinition to, plan should be BuildabletaskDescriptor - for the taskDefinition to be addeduserDescription - description the user has specified for this taskDefinitionisEnabled - - set enabled/disabled state of the newly created taskconfiguration - configuration from the plugin for this taskDefinitiontaskRootDirectorySelector - - data defining root of working directory of taskTaskDefinition createdIllegalArgumentException - if planKey is invalid (e.g. doesn't exist or is not a buildable)void moveTask(@NotNull
PlanKey planKey,
long taskId,
long beforeId,
long afterId,
boolean isFinal)
throws IllegalArgumentException,
IllegalStateException
planKey - the plan the taskDefinition is intaskId - ID of the TaskDefinition to movebeforeId - ID of the taskDefinition that will be before the moving Task, -1 if the beginning of the listafterId - ID of the taskDefinition that will be after the moving Task, -1 if the end of the listisFinal - whether the task being moved is finalising or not, may or may not require changing.IllegalArgumentException - if planKey is invalid (e.g. doesn't exist or is not a buildable), or the task to move
doesn't existIllegalStateException - if the task list is not in the expected order, i.e there have been incompatable changes
made to the list since the move request was sent.void deleteTask(@NotNull
PlanKey planKey,
long taskId)
throws IllegalArgumentException,
IllegalStateException
planKey - for the plan to delete the TaskDefinition fromtaskId - of the TaskDefinition 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.TaskDefinition editTask(@NotNull PlanKey planKey, long taskId, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> taskConfigurationMap, @NotNull TaskRootDirectorySelector taskRootDirectorySelector) throws IllegalArgumentException
planKey - - the plan the taskDefintion belongs to, must be buildabletaskId - - the taskDefinition to edituserDescription - - new user descriptionisEnabled - - set new enabled/disabled statetaskConfigurationMap - - new task ConfigurationtaskRootDirectorySelector - - data defining root of working directory of taskTaskDefinition with updates.IllegalArgumentException - if planKey or taskId is invalid.TaskDefinition setTaskState(@NotNull PlanKey planKey, long taskId, boolean isEnabled) throws IllegalArgumentException
planKey - - the plan the taskDefintion belongs to, must be buildabletaskId - - the taskDefinition to editisEnabled - - set new enabled/disabled stateTaskDefinition with updates.IllegalArgumentException - if planKey or taskId is invalid.void moveFinalBar(PlanKey planKey, long beforeId, long afterId) throws IllegalArgumentException, IllegalStateException
planKey - - the plan the task list belongs tobeforeId - - the id of the task we want before the bar, -1 if beginning of listafterId - - the id of the task we want after the bar, -1 if end of listIllegalArgumentException - if plan does not existIllegalStateException - if task list has changed since move requestedvoid createTaskList(PlanKey planKey, @NotNull List<TaskDefinition> taskDefinitions)
planKey - - the plan the task list belongs totaskDefinitions - - list of the tasks to be addedIllegalArgumentException - if plan does not exist@NotNull Collection<Requirement> getTasksRequirements(@NotNull PlanKey planKey)
planKey - Jobs TaskTypesIllegalArgumentException - if plan does not existIllegalStateExceptionvoid updateRepositoryIdsInJobsTasks(@NotNull
Job job,
Map<Long,Long> repositoryIdsChanges)
job - repositoryIdsChanges - mapping between old and new repositories idsList<TaskDefinition> getRelevantTasksForRepositoryId(@NotNull ImmutableJob job, long repositoryId)
TaskDefinition for given Job and repositoryIdjob - repositoryId - Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.