com.atlassian.bamboo.task.repository
Class AbstractRepositoryAwareTaskConfigurator

java.lang.Object
  extended by com.atlassian.bamboo.task.AbstractTaskConfigurator
      extended by com.atlassian.bamboo.task.repository.AbstractRepositoryAwareTaskConfigurator
All Implemented Interfaces:
DeploymentTaskRequirementSupport, RepositoryAwareDeploymentTaskConfigurator, BuildTaskRequirementSupport, RepositoryAwareTaskConfigurator, TaskConfigurator
Direct Known Subclasses:
VcsBranchingTaskConfigurator, VcsCheckoutTaskConfigurator, VcsTaggingTaskConfigurator

public abstract class AbstractRepositoryAwareTaskConfigurator
extends AbstractTaskConfigurator
implements RepositoryAwareTaskConfigurator, RepositoryAwareDeploymentTaskConfigurator


Field Summary
protected  EnvironmentService environmentService
           
protected  RepositoryDefinitionManager repositoryDefinitionManager
           
protected  RepositoryManager repositoryManager
           
protected  com.opensymphony.xwork.TextProvider textProvider
           
 
Fields inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
bambooAuthenticationContext, taskConfiguratorHelper
 
Constructor Summary
AbstractRepositoryAwareTaskConfigurator()
           
 
Method Summary
 java.util.Set<Requirement> calculateRequirements(TaskDefinition taskDefinition, Environment environment)
          Populates the RequirementSet needed based off of the TaskDefinition
 java.util.Set<Requirement> calculateRequirements(TaskDefinition taskDefinition, Job job)
          Populates the RequirementSet needed based off of the TaskDefinition
 java.util.List<RepositoryDefinition> getRepositoriesUsedByTask(TaskDefinition taskDefinition, Environment environment)
           
 java.util.List<RepositoryDefinition> getRepositoriesUsedByTask(TaskDefinition taskDefinition, ImmutableJob job)
           
 void handleRepositoryIdChanged(TaskDefinition taskDefinition, Job job, java.util.Map<java.lang.Long,java.lang.Long> repositoryIdChanges)
          Action taken if repository id changed, i.e.
 void handleRepositoryIdChanged(TaskDefinition taskDefinition, java.util.Map<java.lang.Long,java.lang.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.xwork.TextProvider textProvider)
           
 
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, populateContextForView, validate
 

Field Detail

textProvider

protected com.opensymphony.xwork.TextProvider textProvider

repositoryManager

protected RepositoryManager repositoryManager

repositoryDefinitionManager

protected RepositoryDefinitionManager repositoryDefinitionManager

environmentService

protected EnvironmentService environmentService
Constructor Detail

AbstractRepositoryAwareTaskConfigurator

public AbstractRepositoryAwareTaskConfigurator()
Method Detail

handleRepositoryIdChanged

public void handleRepositoryIdChanged(@NotNull
                                      TaskDefinition taskDefinition,
                                      @NotNull
                                      java.util.Map<java.lang.Long,java.lang.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 interface RepositoryAwareDeploymentTaskConfigurator
Specified by:
handleRepositoryIdChanged in interface RepositoryAwareTaskConfigurator
Parameters:
taskDefinition - definition of a Task
repositoryIdChanges - mapping between old and new repository identifiers

handleRepositoryIdChanged

public void handleRepositoryIdChanged(@NotNull
                                      TaskDefinition taskDefinition,
                                      @NotNull
                                      Job job,
                                      @NotNull
                                      java.util.Map<java.lang.Long,java.lang.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 interface RepositoryAwareTaskConfigurator
Parameters:
taskDefinition - definition of a Task
repositoryIdChanges - mapping between old and new repository identifiers

getRepositoriesUsedByTask

@NotNull
public java.util.List<RepositoryDefinition> getRepositoriesUsedByTask(@NotNull
                                                                              TaskDefinition taskDefinition,
                                                                              @NotNull
                                                                              ImmutableJob job)
Specified by:
getRepositoriesUsedByTask in interface RepositoryAwareTaskConfigurator
Parameters:
taskDefinition - definition of a Task
Returns:
list of RepositoryDefinition referenced by the Task

getRepositoriesUsedByTask

@NotNull
public java.util.List<RepositoryDefinition> getRepositoriesUsedByTask(@NotNull
                                                                              TaskDefinition taskDefinition,
                                                                              @NotNull
                                                                              Environment environment)
Specified by:
getRepositoriesUsedByTask in interface RepositoryAwareDeploymentTaskConfigurator
Parameters:
taskDefinition - definition of a Task
Returns:
list of RepositoryDefinition referenced by the Task

calculateRequirements

@NotNull
public java.util.Set<Requirement> calculateRequirements(@NotNull
                                                                TaskDefinition taskDefinition,
                                                                @NotNull
                                                                Job job)
Description copied from interface: BuildTaskRequirementSupport
Populates the RequirementSet needed based off of the TaskDefinition

Specified by:
calculateRequirements in interface BuildTaskRequirementSupport
Overrides:
calculateRequirements in class AbstractTaskConfigurator
Returns:
requirements

calculateRequirements

@NotNull
public java.util.Set<Requirement> calculateRequirements(@NotNull
                                                                TaskDefinition taskDefinition,
                                                                @NotNull
                                                                Environment environment)
Description copied from interface: DeploymentTaskRequirementSupport
Populates the RequirementSet needed based off of the TaskDefinition

Specified by:
calculateRequirements in interface DeploymentTaskRequirementSupport
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.xwork.TextProvider textProvider)

setEnvironmentService

public void setEnvironmentService(EnvironmentService environmentService)


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