com.atlassian.bamboo.task
Class AbstractTaskConfigurator

java.lang.Object
  extended by com.atlassian.bamboo.task.AbstractTaskConfigurator
All Implemented Interfaces:
TaskConfigurator
Direct Known Subclasses:
AbstractMavenBuildTaskConfigurator, AbstractRepositoryAwareTaskConfigurator, AbstractShellCommandTaskConfigurator, AntBuildTaskConfigurator, GrailsTaskConfigurator, MavenDependenciesProcessorConfigurator, PhpUnitBuildTaskConfigurator, TestResultsParserTaskConfigurator

public abstract class AbstractTaskConfigurator
extends java.lang.Object
implements TaskConfigurator


Field Summary
protected  BambooAuthenticationContext bambooAuthenticationContext
           
protected  TaskConfiguratorHelper taskConfiguratorHelper
           
 
Constructor Summary
AbstractTaskConfigurator()
           
 
Method Summary
 java.util.Set<Requirement> calculateRequirements(TaskDefinition taskDefinition, Buildable buildable)
          Deprecated. 
 java.util.Set<Requirement> calculateRequirements(TaskDefinition taskDefinition, Job job)
          Provides default implementation of BuildTaskRequirementSupport.calculateRequirements(TaskDefinition, Job)
 java.util.Map<java.lang.String,java.lang.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.
protected  I18nBean getI18nBean()
           
 void populateContextForCreate(java.util.Map<java.lang.String,java.lang.Object> context)
          Provide any required context to be used when rendering the freemarker template for creating a task definition.
 void populateContextForEdit(java.util.Map<java.lang.String,java.lang.Object> context, TaskDefinition taskDefinition)
          Provide any required context to be used when rendering the freemarker template for view editing a task definition
 void populateContextForView(java.util.Map<java.lang.String,java.lang.Object> context, TaskDefinition taskDefinition)
          Provide any required context to be used when rendering the freemarker template for viewing a task definition
 void setAuthenticationContext(BambooAuthenticationContext bambooAuthenticationContext)
           
 void setTaskConfiguratorHelper(TaskConfiguratorHelper taskConfiguratorHelper)
           
 void validate(ActionParametersMap params, ErrorCollection errorCollection)
          Validate the params submitted from the UI for this task definition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

taskConfiguratorHelper

protected TaskConfiguratorHelper taskConfiguratorHelper

bambooAuthenticationContext

protected BambooAuthenticationContext bambooAuthenticationContext
Constructor Detail

AbstractTaskConfigurator

public AbstractTaskConfigurator()
Method Detail

calculateRequirements

@Deprecated
@NotNull
public java.util.Set<Requirement> calculateRequirements(@NotNull
                                                                           TaskDefinition taskDefinition,
                                                                           @NotNull
                                                                           Buildable buildable)
Deprecated. 


calculateRequirements

@NotNull
public java.util.Set<Requirement> calculateRequirements(@NotNull
                                                                TaskDefinition taskDefinition,
                                                                @NotNull
                                                                Job job)
Provides default implementation of BuildTaskRequirementSupport.calculateRequirements(TaskDefinition, Job)


generateTaskConfigMap

@NotNull
public java.util.Map<java.lang.String,java.lang.String> generateTaskConfigMap(@NotNull
                                                                                      ActionParametersMap params,
                                                                                      @Nullable
                                                                                      TaskDefinition previousTaskDefinition)
Description copied from interface: TaskConfigurator
Convert the params from the ui into a config map to be stored in the database for the taskDefinition. Can assume validation has occured in the #validate method

Specified by:
generateTaskConfigMap in interface TaskConfigurator
Parameters:
params - - request paramaters
previousTaskDefinition - - the previous immutable TaskDefinition before saving or null if Task is being created
Returns:
the configuration map to be stored in the database

populateContextForCreate

public void populateContextForCreate(@NotNull
                                     java.util.Map<java.lang.String,java.lang.Object> context)
Description copied from interface: TaskConfigurator
Provide any required context to be used when rendering the freemarker template for creating a task definition. Allows you to add any default values for initial creation

Specified by:
populateContextForCreate in interface TaskConfigurator
Parameters:
context - map to put your context in.

populateContextForEdit

public void populateContextForEdit(@NotNull
                                   java.util.Map<java.lang.String,java.lang.Object> context,
                                   @NotNull
                                   TaskDefinition taskDefinition)
Description copied from interface: TaskConfigurator
Provide any required context to be used when rendering the freemarker template for view editing a task definition

Specified by:
populateContextForEdit in interface TaskConfigurator
Parameters:
context - map to put your context in.
taskDefinition - existing task definition

populateContextForView

public void populateContextForView(@NotNull
                                   java.util.Map<java.lang.String,java.lang.Object> context,
                                   @NotNull
                                   TaskDefinition taskDefinition)
Description copied from interface: TaskConfigurator
Provide any required context to be used when rendering the freemarker template for viewing a task definition

Specified by:
populateContextForView in interface TaskConfigurator
Parameters:
context - map to put your context in.
taskDefinition - existing task definition

validate

public void validate(@NotNull
                     ActionParametersMap params,
                     @NotNull
                     ErrorCollection errorCollection)
Description copied from interface: TaskConfigurator
Validate the params submitted from the UI for this task definition

Specified by:
validate in interface TaskConfigurator
Parameters:
params - - request paramaters
errorCollection - - collection to put any errors in.

getI18nBean

protected final I18nBean getI18nBean()

setTaskConfiguratorHelper

public void setTaskConfiguratorHelper(TaskConfiguratorHelper taskConfiguratorHelper)

setAuthenticationContext

public void setAuthenticationContext(BambooAuthenticationContext bambooAuthenticationContext)


Copyright © 2012 Atlassian. All Rights Reserved.