|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.task.TaskConfigurationServiceImpl
@Internal public class TaskConfigurationServiceImpl
Constructor Summary | |
---|---|
TaskConfigurationServiceImpl(BuildDefinitionManager buildDefinitionManager,
TaskManager taskManager,
BuildDefinitionConverter buildDefinitionConverter,
com.opensymphony.xwork2.TextProvider textProvider,
PlanManager planManager,
AuditLogService auditLogService,
ScopedExclusionService scopedExclusionService)
|
Method Summary | |
---|---|
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 |
protected TaskDefinition |
getTaskById(List<TaskDefinition> tasks,
long id)
|
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. |
TaskDefinition |
setTaskState(PlanKey planKey,
long taskId,
boolean disabled)
Update the disable state of specific taskDefinition |
void |
updateRepositoryIdsInJobsTasks(Job job,
Map<Long,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.xwork2.TextProvider textProvider, PlanManager planManager, AuditLogService auditLogService, ScopedExclusionService scopedExclusionService)
Method Detail |
---|
public TaskDefinition createTask(@NotNull PlanKey planKey, @NotNull TaskModuleDescriptor taskDescriptor, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,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 taskDefinitionisEnabled
- - set enabled/disabled state of the newly created taskconfiguration
- configuration from the plugin for this taskDefinitiontaskRootDirectorySelector
- - data defining root of working directory of task
TaskDefinition
createdpublic void createTaskList(PlanKey planKey, @NotNull 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 String userDescription, boolean isEnabled, @NotNull Map<String,String> taskConfigurationMap, @NotNull TaskRootDirectorySelector taskRootDirectorySelector) throws IllegalArgumentException
TaskConfigurationService
editTask
in interface TaskConfigurationService
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 task
TaskDefinition
with updates.
IllegalArgumentException
- if planKey or taskId is invalid.public TaskDefinition setTaskState(@NotNull PlanKey planKey, long taskId, boolean disabled) throws IllegalArgumentException
TaskConfigurationService
setTaskState
in interface TaskConfigurationService
planKey
- - the plan the taskDefintion belongs to, must be buildabletaskId
- - the taskDefinition to editdisabled
- - set new enabled/disabled state
TaskDefinition
with updates.
IllegalArgumentException
- if planKey or taskId is invalid.public List<TaskDefinition> getRelevantTasksForRepositoryId(@NotNull ImmutableJob job, long repositoryId)
TaskConfigurationService
TaskDefinition
for given Job
and repositoryId
getRelevantTasksForRepositoryId
in interface TaskConfigurationService
public void updateRepositoryIdsInJobsTasks(@NotNull Job job, Map<Long,Long> repositoryIdsChanges)
TaskConfigurationService
updateRepositoryIdsInJobsTasks
in interface TaskConfigurationService
repositoryIdsChanges
- mapping between old and new repositories ids@NotNull public 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 IllegalArgumentException, 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
IllegalArgumentException
- if plan does not exist
IllegalStateException
- if task list has changed since move requested@Nullable protected TaskDefinition getTaskById(@NotNull List<TaskDefinition> tasks, long id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |