@PublicApi
public interface TaskManager
Modifier and Type | Method and Description |
---|---|
void |
calculateRequirementsForTaskDefinition(Job job,
TaskDefinition taskDefinition)
Attempts to add
Requirement s 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,
Supplier<Set<Requirement>> requirementSupplier)
Attempts to add
Requirement s to the specified RequirementSet . |
List<TaskModuleDescriptor> |
getAvailableBuildTaskDescriptors() |
List<TaskModuleDescriptor> |
getAvailableDeploymentTaskDescriptors() |
List<TaskModuleDescriptor> |
getAvailableTaskDescriptors() |
Set<String> |
getCapabilitiesWithExecutables(Set<String> executableType)
Returns a set of capabilities that have executable types defined for them in the system.
|
Map<String,String> |
getExecutableLabelTypeMap()
Returns a map of currently available "configured" executables - uniquely identified by a label.
|
TaskModuleDescriptor |
getTaskDescriptor(String pluginKey)
Get the task type descriptor matching a particular plugin key.
|
Collection<Requirement> |
getTasksRequirements(Job job)
Return
Requirement s for all tasks of Buildable if the TaskConfigurator is an implementor of BuildTaskRequirementSupport |
void |
removeRequirementsForTaskDefinition(Buildable buildable,
TaskDefinition taskDefinition)
Removes all the
Requirement s that belong to the TaskDefinition |
void |
removeRequirementsForTaskDefinition(RequirementSet requirementSet,
TaskDefinition taskDefinition)
Removes all the
Requirement s that belong to the TaskDefinition |
boolean |
taskProducesTestResults(TaskDefinition taskDefinition)
Return true iff task defined in
TaskDefinition is configured to produce test results. |
void |
updateRepositoryIdsInTask(TaskDefinition taskDefinition,
Map<Long,Long> repositoryIdChanges)
Updates task configurations affected by repository edition.
|
void |
updateWorkingDirSelectors(ImmutableBuildable job,
BuildDefinition buildDefinition,
Map<Long,Long> repositoryIdsChanges)
Calculates id of the repository that defines working directory after repository or task edition.
|
@NotNull List<TaskModuleDescriptor> getAvailableTaskDescriptors()
@NotNull List<TaskModuleDescriptor> getAvailableBuildTaskDescriptors()
@NotNull List<TaskModuleDescriptor> getAvailableDeploymentTaskDescriptors()
@Nullable TaskModuleDescriptor getTaskDescriptor(@Nullable String pluginKey)
pluginKey
- - key to matchvoid calculateRequirementsForTaskDefinition(@NotNull Job job, @NotNull TaskDefinition taskDefinition)
Requirement
s 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 recalculatedjob
- taskDefinition
- void calculateRequirementsForTaskDefinition(@NotNull RequirementSet requirementSet, @NotNull TaskDefinition taskDefinition, Supplier<Set<Requirement>> requirementSupplier)
Requirement
s 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 recalculatedrequirementSet
- to add requirements update requirements intaskDefinition
- to calculate requirements fromvoid removeRequirementsForTaskDefinition(@NotNull Buildable buildable, @NotNull TaskDefinition taskDefinition)
Requirement
s that belong to the TaskDefinition
buildable
- to remove requirements fromtaskDefinition
- that was removedvoid removeRequirementsForTaskDefinition(@NotNull RequirementSet requirementSet, @NotNull TaskDefinition taskDefinition)
Requirement
s that belong to the TaskDefinition
requirementSet
- to remove requirements fromtaskDefinition
- that was removed@NotNull Collection<Requirement> getTasksRequirements(@NotNull Job job)
Requirement
s for all tasks of Buildable
if the TaskConfigurator
is an implementor of BuildTaskRequirementSupport
job@throws
- IllegalStateExceptionboolean taskProducesTestResults(@NotNull TaskDefinition taskDefinition)
TaskDefinition
is configured to produce test results.taskDefinition
- Map<String,String> getExecutableLabelTypeMap()
Maps label -> taskExecutableType.getExecutableKey().
The executables are backed by available capabilities system wide, filtered by executables which are actually activated in the plugin system.
void updateRepositoryIdsInTask(@NotNull TaskDefinition taskDefinition, @NotNull Map<Long,Long> repositoryIdChanges)
taskDefinition
- repositoryIdChanges
- mapping between old and new repositories idsvoid updateWorkingDirSelectors(@NotNull ImmutableBuildable job, @NotNull BuildDefinition buildDefinition, @NotNull Map<Long,Long> repositoryIdsChanges)
job
- affected jobbuildDefinition
- repositoryIdsChanges
- mapping between old and new repositories idsCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.