Class AbstractRepositoryAwareTaskConfigurator
- java.lang.Object
-
- com.atlassian.bamboo.task.AbstractTaskConfigurator
-
- com.atlassian.bamboo.task.repository.AbstractRepositoryAwareTaskConfigurator
-
- All Implemented Interfaces:
DeploymentTaskRequirementSupport
,RepositoryAwareDeploymentTaskConfigurator
,BuildTaskRequirementSupport
,RepositoryAwareTaskConfigurator
,TaskConfigurator
- Direct Known Subclasses:
AbstractVcsTaskConfigurator
,VcsCheckoutTaskConfigurator
public abstract class AbstractRepositoryAwareTaskConfigurator extends AbstractTaskConfigurator implements RepositoryAwareTaskConfigurator, RepositoryAwareDeploymentTaskConfigurator
-
-
Field Summary
Fields Modifier and Type Field Description protected EnvironmentService
environmentService
protected RepositoryDefinitionManager
repositoryDefinitionManager
protected RepositoryManager
repositoryManager
protected com.opensymphony.xwork2.TextProvider
textProvider
protected VcsRepositoryManager
vcsRepositoryManager
-
Fields inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
bambooAuthenticationContext, taskConfiguratorHelper
-
-
Constructor Summary
Constructors Constructor Description AbstractRepositoryAwareTaskConfigurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Set<Requirement>
calculateRequirements(@NotNull TaskDefinition taskDefinition, @NotNull Job job)
Populates theRequirementSet
needed based off of theTaskDefinition
@NotNull Set<Requirement>
calculateRequirements(@NotNull TaskDefinition taskDefinition, @NotNull Environment environment)
Populates theRequirementSet
needed based off of theTaskDefinition
@NotNull List<PlanRepositoryDefinition>
getPlanRepositoriesUsedByTask(@NotNull TaskDefinition taskDefinition, @NotNull InternalEnvironment environment)
@NotNull List<PlanRepositoryDefinition>
getPlanRepositoriesUsedByTask(@NotNull TaskDefinition taskDefinition, @NotNull ImmutableJob job)
@NotNull List<RepositoryDefinition>
getRepositoriesUsedByTask(@NotNull TaskDefinition taskDefinition, @NotNull Environment environment)
Not used by Bamboo and doesn't need to be implemented.@NotNull List<RepositoryDefinition>
getRepositoriesUsedByTask(@NotNull TaskDefinition taskDefinition, @NotNull ImmutableJob job)
Not used by Bamboo and doesn't need to be implemented.void
handleRepositoryIdChanged(@NotNull TaskDefinition taskDefinition, @NotNull Map<Long,Long> repositoryIdChanges)
Action taken if repository id changed, i.e.void
setEnvironmentService(EnvironmentService environmentService)
void
setRepositoryDefinitionManager(RepositoryDefinitionManager repositoryDefinitionManager)
void
setRepositoryManager(RepositoryManager repositoryManager)
void
setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
void
setVcsRepositoryManager(VcsRepositoryManager vcsRepositoryManager)
-
Methods inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
calculateRequirements, generateTaskConfigMap, getI18nBean, populateContextForCreate, populateContextForEdit, populateContextForView, setAuthenticationContext, setTaskConfiguratorHelper, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.task.TaskConfigurator
generateTaskConfigMap, populateContextForCreate, populateContextForEdit, validate
-
-
-
-
Field Detail
-
textProvider
protected com.opensymphony.xwork2.TextProvider textProvider
-
repositoryManager
protected RepositoryManager repositoryManager
-
repositoryDefinitionManager
protected RepositoryDefinitionManager repositoryDefinitionManager
-
environmentService
protected EnvironmentService environmentService
-
vcsRepositoryManager
protected VcsRepositoryManager vcsRepositoryManager
-
-
Method Detail
-
handleRepositoryIdChanged
public void handleRepositoryIdChanged(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull Map<Long,Long> repositoryIdChanges)
Description copied from interface:RepositoryAwareTaskConfigurator
Action taken if repository id changed, i.e. after repository is edited. Typically it should replace old repository identifiers with corresponding new id.- Specified by:
handleRepositoryIdChanged
in interfaceRepositoryAwareDeploymentTaskConfigurator
- Specified by:
handleRepositoryIdChanged
in interfaceRepositoryAwareTaskConfigurator
- Parameters:
taskDefinition
- definition of a TaskrepositoryIdChanges
- mapping between old and new repository identifiers
-
getRepositoriesUsedByTask
@NotNull public @NotNull List<RepositoryDefinition> getRepositoriesUsedByTask(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull ImmutableJob job)
Description copied from interface:RepositoryAwareTaskConfigurator
Not used by Bamboo and doesn't need to be implemented.- Specified by:
getRepositoriesUsedByTask
in interfaceRepositoryAwareTaskConfigurator
- Parameters:
taskDefinition
- definition of a Task- Returns:
- list of
RepositoryDefinition
referenced by the Task
-
getRepositoriesUsedByTask
@NotNull public @NotNull List<RepositoryDefinition> getRepositoriesUsedByTask(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull Environment environment)
Description copied from interface:RepositoryAwareDeploymentTaskConfigurator
Not used by Bamboo and doesn't need to be implemented.- Specified by:
getRepositoriesUsedByTask
in interfaceRepositoryAwareDeploymentTaskConfigurator
- Parameters:
taskDefinition
- definition of a Task- Returns:
- list of
RepositoryDefinition
referenced by the Task
-
getPlanRepositoriesUsedByTask
@NotNull public @NotNull List<PlanRepositoryDefinition> getPlanRepositoriesUsedByTask(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull ImmutableJob job)
- Specified by:
getPlanRepositoriesUsedByTask
in interfaceRepositoryAwareTaskConfigurator
- Parameters:
taskDefinition
- definition of a Task- Returns:
- list of
PlanRepositoryDefinition
referenced by the Task
-
getPlanRepositoriesUsedByTask
@NotNull public @NotNull List<PlanRepositoryDefinition> getPlanRepositoriesUsedByTask(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull InternalEnvironment environment)
- Specified by:
getPlanRepositoriesUsedByTask
in interfaceRepositoryAwareDeploymentTaskConfigurator
- Parameters:
taskDefinition
- definition of a Task- Returns:
- list of
PlanRepositoryDefinition
referenced by the Task
-
calculateRequirements
@NotNull public @NotNull Set<Requirement> calculateRequirements(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull Job job)
Description copied from interface:BuildTaskRequirementSupport
Populates theRequirementSet
needed based off of theTaskDefinition
- Specified by:
calculateRequirements
in interfaceBuildTaskRequirementSupport
- Overrides:
calculateRequirements
in classAbstractTaskConfigurator
- Returns:
- requirements
-
calculateRequirements
@NotNull public @NotNull Set<Requirement> calculateRequirements(@NotNull @NotNull TaskDefinition taskDefinition, @NotNull @NotNull Environment environment)
Description copied from interface:DeploymentTaskRequirementSupport
Populates theRequirementSet
needed based off of theTaskDefinition
- Specified by:
calculateRequirements
in interfaceDeploymentTaskRequirementSupport
- Parameters:
taskDefinition
- the task definition that would be causing the requirement to be needed.environment
- the task definition belongs to- Returns:
- requirements
-
setRepositoryManager
public void setRepositoryManager(RepositoryManager repositoryManager)
-
setRepositoryDefinitionManager
public void setRepositoryDefinitionManager(RepositoryDefinitionManager repositoryDefinitionManager)
-
setTextProvider
public void setTextProvider(com.opensymphony.xwork2.TextProvider textProvider)
-
setEnvironmentService
public void setEnvironmentService(EnvironmentService environmentService)
-
setVcsRepositoryManager
public void setVcsRepositoryManager(VcsRepositoryManager vcsRepositoryManager)
-
-