|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.task.TaskConfigurationServiceImpl
public class TaskConfigurationServiceImpl
Constructor Summary | |
---|---|
TaskConfigurationServiceImpl(BuildDefinitionManager buildDefinitionManager,
TaskManager taskManager,
BuildDefinitionConverter buildDefinitionConverter,
com.opensymphony.xwork.TextProvider textProvider,
PlanManager planManager,
AuditLogService auditLogService,
ScopedExclusionService scopedExclusionService)
|
Method Summary | |
---|---|
protected java.util.List<TaskDefinition> |
addTaskToList(java.util.List<TaskDefinition> originalTasks,
TaskDefinition toAdd)
|
protected void |
adjustFinalisingBar(java.util.List<TaskDefinition> tasks,
long beforeId,
long afterId)
|
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)
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,
java.lang.String userDescription,
java.util.Map<java.lang.String,java.lang.String> taskConfigurationMap,
TaskRootDirectorySelector taskRootDirectorySelector)
Update the details of specific taskDefinition |
protected java.util.List<TaskDefinition> |
getNewTaskList(java.util.List<TaskDefinition> originalTasks,
TaskDefinition toMove,
long beforeId,
long afterId,
boolean isFinal)
|
java.util.List<TaskDefinition> |
getRelevantTasksForRepositoryId(Job job,
long repositoryId)
Return relevant TaskDefinition for given Job and repositoryId |
protected TaskDefinition |
getTaskById(java.util.List<TaskDefinition> tasks,
long id)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskConfigurationServiceImpl(BuildDefinitionManager buildDefinitionManager, TaskManager taskManager, BuildDefinitionConverter buildDefinitionConverter, com.opensymphony.xwork.TextProvider textProvider, PlanManager planManager, AuditLogService auditLogService, ScopedExclusionService scopedExclusionService)
Method Detail |
---|
public 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)
TaskConfigurationService
createTask
in interface TaskConfigurationService
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
createdpublic void createTaskList(PlanKey planKey, @NotNull java.util.List<TaskDefinition> taskDefinitions)
TaskConfigurationService
createTaskList
in interface TaskConfigurationService
planKey
- - the plan the task list belongs totaskDefinitions
- - list of the tasks to be addedpublic void moveTask(@NotNull PlanKey planKey, long taskId, long beforeId, long afterId, boolean isFinal)
TaskConfigurationService
moveTask
in interface TaskConfigurationService
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.public void deleteTask(@NotNull PlanKey planKey, long taskId)
TaskConfigurationService
deleteTask
in interface TaskConfigurationService
planKey
- for the plan to delete the TaskDefinition fromtaskId
- of the TaskDefinition to delete.public 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
TaskConfigurationService
editTask
in interface TaskConfigurationService
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.public java.util.List<TaskDefinition> getRelevantTasksForRepositoryId(@NotNull Job job, long repositoryId)
TaskConfigurationService
TaskDefinition
for given Job
and repositoryId
getRelevantTasksForRepositoryId
in interface TaskConfigurationService
public void updateRepositoryIdsInJobsTasks(@NotNull Job job, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
TaskConfigurationService
updateRepositoryIdsInJobsTasks
in interface TaskConfigurationService
repositoryIdsChanges
- mapping between old and new repositories ids@NotNull public java.util.Collection<Requirement> getTasksRequirements(@NotNull PlanKey planKey)
TaskConfigurationService
Requirement
s for all tasks of Plan
represented by PlanKey
getTasksRequirements
in interface TaskConfigurationService
Job
s TaskType
spublic void moveFinalBar(PlanKey planKey, long beforeId, long afterId) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
TaskConfigurationService
moveFinalBar
in interface TaskConfigurationService
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@Nullable protected TaskDefinition getTaskById(@NotNull java.util.List<TaskDefinition> tasks, long id)
protected void adjustFinalisingBar(@NotNull java.util.List<TaskDefinition> tasks, long beforeId, long afterId)
@NotNull protected java.util.List<TaskDefinition> getNewTaskList(@NotNull java.util.List<TaskDefinition> originalTasks, @NotNull TaskDefinition toMove, long beforeId, long afterId, boolean isFinal)
@NotNull protected java.util.List<TaskDefinition> addTaskToList(@NotNull java.util.List<TaskDefinition> originalTasks, @NotNull TaskDefinition toAdd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |