public class WarningsTaskConfigurator extends Object implements TaskConfigurator, RepositoryAwareTaskConfigurator
Constructor and Description |
---|
WarningsTaskConfigurator(com.atlassian.sal.api.message.I18nResolver i18nResolver,
TaskConfiguratorHelper taskConfiguratorHelper,
CachedPlanManager cachedPlanManager,
ParsersListProvider parsersListProvider) |
Modifier and Type | Method and Description |
---|---|
Set<Requirement> |
calculateRequirements(TaskDefinition taskDefinition,
Job job)
Populates the
RequirementSet needed based off of the TaskDefinition |
Map<String,String> |
generateTaskConfigMap(ActionParametersMap params,
TaskDefinition previousTaskDefinition)
Convert the params from the ui into a config map to be stored in the database for the taskDefinition.
|
List<RepositoryDefinition> |
getRepositoriesUsedByTask(TaskDefinition taskDefinition,
ImmutableJob job) |
void |
handleRepositoryIdChanged(TaskDefinition taskDefinition,
Map<Long,Long> repositoryIdChanges)
Action taken if repository id changed, i.e.
|
void |
populateContextForCreate(Map<String,Object> context)
Provide any required context to be used when rendering the freemarker template for creating a task definition.
|
void |
populateContextForEdit(Map<String,Object> context,
TaskDefinition taskDefinition)
Provide any required context to be used when rendering the freemarker template for view editing a task definition
|
void |
validate(ActionParametersMap params,
ErrorCollection errorCollection)
Validate the params submitted from the UI for this task definition
|
@Inject public WarningsTaskConfigurator(com.atlassian.sal.api.message.I18nResolver i18nResolver, TaskConfiguratorHelper taskConfiguratorHelper, CachedPlanManager cachedPlanManager, ParsersListProvider parsersListProvider)
public void populateContextForEdit(@NotNull Map<String,Object> context, @NotNull TaskDefinition taskDefinition)
TaskConfigurator
populateContextForEdit
in interface TaskConfigurator
context
- map to put your context in.taskDefinition
- existing task definitionpublic void populateContextForCreate(@NotNull Map<String,Object> context)
TaskConfigurator
populateContextForCreate
in interface TaskConfigurator
context
- map to put your context in.public void validate(@NotNull ActionParametersMap params, @NotNull ErrorCollection errorCollection)
TaskConfigurator
validate
in interface TaskConfigurator
params
- - request paramaterserrorCollection
- - collection to put any errors in.@NotNull public Map<String,String> generateTaskConfigMap(@NotNull ActionParametersMap params, @Nullable TaskDefinition previousTaskDefinition)
TaskConfigurator
generateTaskConfigMap
in interface TaskConfigurator
params
- - request paramaterspreviousTaskDefinition
- - the previous immutable TaskDefinition
before saving or null if Task is being created@NotNull public List<RepositoryDefinition> getRepositoriesUsedByTask(@NotNull TaskDefinition taskDefinition, @NotNull ImmutableJob job)
getRepositoriesUsedByTask
in interface RepositoryAwareTaskConfigurator
taskDefinition
- definition of a TaskRepositoryDefinition
referenced by the Taskpublic void handleRepositoryIdChanged(@NotNull TaskDefinition taskDefinition, @NotNull Map<Long,Long> repositoryIdChanges)
RepositoryAwareTaskConfigurator
handleRepositoryIdChanged
in interface RepositoryAwareTaskConfigurator
taskDefinition
- definition of a TaskrepositoryIdChanges
- mapping between old and new repository identifiers@NotNull public Set<Requirement> calculateRequirements(@NotNull TaskDefinition taskDefinition, @NotNull Job job)
BuildTaskRequirementSupport
RequirementSet
needed based off of the TaskDefinition
calculateRequirements
in interface BuildTaskRequirementSupport
Copyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.