com.atlassian.bamboo.task
Interface TaskManager

All Known Implementing Classes:
TaskManagerImpl

public interface TaskManager

Since:
3.1

Method Summary
 void calculateRequirementsForTaskDefinition(Job job, TaskDefinition taskDefinition)
          Attempts to add Requirements to the specified Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport If requirements are already present for the specified TaskDefinition they will be removed and recalculated
 void calculateRequirementsForTaskDefinition(RequirementSet requirementSet, TaskDefinition taskDefinition, com.google.common.base.Supplier<java.util.Set<Requirement>> requirementSupplier)
          Attempts to add Requirements to the specified RequirementSet.
 java.util.List<TaskModuleDescriptor> getAvailableBuildTaskDescriptors()
           
 java.util.List<TaskModuleDescriptor> getAvailableDeploymentTaskDescriptors()
           
 java.util.List<TaskModuleDescriptor> getAvailableTaskDescriptors()
           
 java.util.Map<java.lang.String,java.lang.String> getExecutableLabelTypeMap()
          Returns a map of currently available "configured" executables - uniquely identified by a label.
 TaskModuleDescriptor getTaskDescriptor(java.lang.String pluginKey)
          Get the task type descriptor matching a particular plugin key.
 java.util.Collection<Requirement> getTasksRequirements(Job job)
          Return Requirements for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport
 void removeRequirementsForTaskDefinition(Buildable buildable, TaskDefinition taskDefinition)
          Removes all the Requirements that belong to the TaskDefinition
 void removeRequirementsForTaskDefinition(RequirementSet requirementSet, TaskDefinition taskDefinition)
          Removes all the Requirements that belong to the TaskDefinition
 boolean taskProducesTestResults(TaskDefinition taskDefinition)
          Return true iff task defined in TaskDefinition is configured to produce test results.
 void updateRepositoryIdsInTask(Job job, TaskDefinition taskDefinition, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdChanges)
          Deprecated. since 4.3, use updateRepositoryIdsInTask(TaskDefinition, Map)
 void updateRepositoryIdsInTask(TaskDefinition taskDefinition, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdChanges)
          Updates task configurations affected by repository edition.
 void updateWorkingDirSelectors(ImmutableBuildable job, BuildDefinition buildDefinition, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
          Calculates id of the repository that defines working directory after repository or task edition.
 

Method Detail

getAvailableTaskDescriptors

@NotNull
java.util.List<TaskModuleDescriptor> getAvailableTaskDescriptors()
Returns:
Provides a list of available tasks types. Returns both Build Tasks and DeploymentTasks

getAvailableBuildTaskDescriptors

@NotNull
java.util.List<TaskModuleDescriptor> getAvailableBuildTaskDescriptors()
Returns:
Provides a list of available build task types.
Since:
5.0

getAvailableDeploymentTaskDescriptors

@NotNull
java.util.List<TaskModuleDescriptor> getAvailableDeploymentTaskDescriptors()
Returns:
Provides a list of available deployment task types.
Since:
5.0

getTaskDescriptor

@Nullable
TaskModuleDescriptor getTaskDescriptor(@Nullable
                                                java.lang.String pluginKey)
Get the task type descriptor matching a particular plugin key.

Parameters:
pluginKey - - key to match
Returns:
TaskModuleDescriptor matching the given key if it exists. Null if the plugin can not be found.

calculateRequirementsForTaskDefinition

void calculateRequirementsForTaskDefinition(@NotNull
                                            Job job,
                                            @NotNull
                                            TaskDefinition taskDefinition)
Attempts to add Requirements to the specified Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport If requirements are already present for the specified TaskDefinition they will be removed and recalculated

Parameters:
job -
taskDefinition -

calculateRequirementsForTaskDefinition

void calculateRequirementsForTaskDefinition(@NotNull
                                            RequirementSet requirementSet,
                                            @NotNull
                                            TaskDefinition taskDefinition,
                                            com.google.common.base.Supplier<java.util.Set<Requirement>> requirementSupplier)
Attempts to add Requirements to the specified RequirementSet. How to get the requirements from the task Definition is determined by the supplier. If requirements are already present for the specified TaskDefinition they will be removed and recalculated

Parameters:
requirementSet - to add requirements update requirements in
taskDefinition - to calculate requirements from

removeRequirementsForTaskDefinition

void removeRequirementsForTaskDefinition(@NotNull
                                         Buildable buildable,
                                         @NotNull
                                         TaskDefinition taskDefinition)
Removes all the Requirements that belong to the TaskDefinition

Parameters:
buildable - to remove requirements from
taskDefinition - that was removed

removeRequirementsForTaskDefinition

void removeRequirementsForTaskDefinition(@NotNull
                                         RequirementSet requirementSet,
                                         @NotNull
                                         TaskDefinition taskDefinition)
Removes all the Requirements that belong to the TaskDefinition

Parameters:
requirementSet - to remove requirements from
taskDefinition - that was removed

getTasksRequirements

@NotNull
java.util.Collection<Requirement> getTasksRequirements(@NotNull
                                                               Job job)
Return Requirements for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport

Parameters:
job@throws - IllegalStateException
Returns:
requirements

taskProducesTestResults

boolean taskProducesTestResults(@NotNull
                                TaskDefinition taskDefinition)
Return true iff task defined in TaskDefinition is configured to produce test results.

Parameters:
taskDefinition -
Returns:
producesTestResults

getExecutableLabelTypeMap

java.util.Map<java.lang.String,java.lang.String> getExecutableLabelTypeMap()
Returns a map of currently available "configured" executables - uniquely identified by a label.

Maps label -> taskExecutableType.getExecutableKey().

The executables are backed by available capabilities system wide, filtered by executables which are actually activated in the plugin system.

Returns:
executableTypeLabelMaps

updateRepositoryIdsInTask

void updateRepositoryIdsInTask(@NotNull
                               TaskDefinition taskDefinition,
                               @NotNull
                               java.util.Map<java.lang.Long,java.lang.Long> repositoryIdChanges)
Updates task configurations affected by repository edition.

Parameters:
taskDefinition -
repositoryIdChanges - mapping between old and new repositories ids
Since:
4.3

updateRepositoryIdsInTask

@Deprecated
void updateRepositoryIdsInTask(@NotNull
                                          Job job,
                                          @NotNull
                                          TaskDefinition taskDefinition,
                                          @NotNull
                                          java.util.Map<java.lang.Long,java.lang.Long> repositoryIdChanges)
Deprecated. since 4.3, use updateRepositoryIdsInTask(TaskDefinition, Map)

Updates task configurations affected by repository edition.

Parameters:
job -
taskDefinition -
repositoryIdChanges - mapping between old and new repositories ids
Since:
3.3

updateWorkingDirSelectors

void updateWorkingDirSelectors(@NotNull
                               ImmutableBuildable job,
                               @NotNull
                               BuildDefinition buildDefinition,
                               @NotNull
                               java.util.Map<java.lang.Long,java.lang.Long> repositoryIdsChanges)
Calculates id of the repository that defines working directory after repository or task edition.

Parameters:
job - affected job
buildDefinition -
repositoryIdsChanges - mapping between old and new repositories ids


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.