|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskConfigurationService
Service to perform task manipulation actions. Helps manage concurrency of manipulations
Method Summary | |
---|---|
TaskDefinition |
createTask(PlanKey planKey,
TaskModuleDescriptor taskDescriptor,
java.lang.String userDescription,
java.util.Map<java.lang.String,java.lang.String> configuration,
TaskRootDirectorySelector taskRootDirectorySelector)
Create a task Definition and save it against the plan |
void |
createTaskList(PlanKey planKey,
java.util.List<TaskDefinition> taskDefinitions)
Deprecated. since 3.4 this method has been created for upgrade purposes and should not be used for regular task manipulation |
void |
deleteTask(PlanKey planKey,
long taskId)
Delete a given taskDefinition |
TaskDefinition |
editTask(PlanKey planKey,
long taskId,
java.lang.String userDescription,
java.util.Map<java.lang.String,java.lang.String> taskConfigurationMap,
TaskRootDirectorySelector taskRootDirectorySelector)
Update the details of specific taskDefinition |
java.util.List<TaskDefinition> |
getRelevantTasksForRepositoryId(Job job,
long repositoryId)
Return relevant TaskDefinition for given Job and repositoryId |
java.util.Collection<Requirement> |
getTasksRequirements(PlanKey planKey)
Return Requirement s for all tasks of Plan represented by 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. |
void |
updateRepositoryIdsInJobsTasks(Job job,
java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
Updates task configurations affected by repository edition. |
Method Detail |
---|
TaskDefinition createTask(@NotNull PlanKey planKey, @NotNull TaskModuleDescriptor taskDescriptor, @Nullable java.lang.String userDescription, @NotNull java.util.Map<java.lang.String,java.lang.String> configuration, @NotNull TaskRootDirectorySelector taskRootDirectorySelector) throws java.lang.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 taskDefinitionconfiguration
- configuration from the plugin for this taskDefinitiontaskRootDirectorySelector
- - data defining root of working directory of task
TaskDefinition
created
java.lang.IllegalArgumentException
- 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 java.lang.IllegalArgumentException, java.lang.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.
java.lang.IllegalArgumentException
- if planKey is invalid (e.g. doesn't exist or is not a buildable), or the task to move
doesn't exist
java.lang.IllegalStateException
- 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 java.lang.IllegalArgumentException, java.lang.IllegalStateException
planKey
- for the plan to delete the TaskDefinition fromtaskId
- of the TaskDefinition to delete.
java.lang.IllegalArgumentException
- if planKey is invalid (e.g. doesn't exist or is not a buildable),
java.lang.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 java.lang.String userDescription, @NotNull java.util.Map<java.lang.String,java.lang.String> taskConfigurationMap, @NotNull TaskRootDirectorySelector taskRootDirectorySelector) throws java.lang.IllegalArgumentException
planKey
- - the plan the taskDefintion belongs to, must be buildabletaskId
- - the taskDefinition to edituserDescription
- - new user descriptiontaskConfigurationMap
- - new task ConfigurationtaskRootDirectorySelector
- - data defining root of working directory of task
TaskDefinition
with updates.
java.lang.IllegalArgumentException
- if planKey or taskId is invalid.void moveFinalBar(PlanKey planKey, long beforeId, long afterId) throws java.lang.IllegalArgumentException, java.lang.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 list
java.lang.IllegalArgumentException
- if plan does not exist
java.lang.IllegalStateException
- if task list has changed since move requested@Deprecated void createTaskList(PlanKey planKey, @NotNull java.util.List<TaskDefinition> taskDefinitions)
planKey
- - the plan the task list belongs totaskDefinitions
- - list of the tasks to be added
java.lang.IllegalArgumentException
- if plan does not exist@NotNull java.util.Collection<Requirement> getTasksRequirements(@NotNull PlanKey planKey)
Requirement
s for all tasks of Plan
represented by PlanKey
planKey
-
Job
s TaskType
s
java.lang.IllegalArgumentException
- if plan does not exist
java.lang.IllegalStateException
void updateRepositoryIdsInJobsTasks(@NotNull Job job, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
job
- repositoryIdsChanges
- mapping between old and new repositories idsjava.util.List<TaskDefinition> getRelevantTasksForRepositoryId(@NotNull Job job, long repositoryId)
TaskDefinition
for given Job
and repositoryId
job
- repositoryId
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |