com.atlassian.bamboo.plugins.maven.task.configuration
Class AbstractMavenBuildTaskConfigurator

java.lang.Object
  extended by com.atlassian.bamboo.task.AbstractTaskConfigurator
      extended by com.atlassian.bamboo.plugins.maven.task.configuration.AbstractMavenBuildTaskConfigurator
All Implemented Interfaces:
BuildTaskRequirementSupport, TaskConfigurator, TaskTestResultsSupport
Direct Known Subclasses:
Maven1BuildTaskConfigurator, Maven2BuildTaskConfigurator, Maven3BuildTaskConfigurator

public abstract class AbstractMavenBuildTaskConfigurator
extends AbstractTaskConfigurator
implements BuildTaskRequirementSupport, TaskTestResultsSupport


Field Summary
static java.lang.String CFG_TEST_RESULTS_FILE_PATTERN_OPTION_CUSTOM
           
static java.lang.String CFG_TEST_RESULTS_FILE_PATTERN_OPTION_STANDARD
           
static java.lang.String DEFAULT_GOALS
           
 
Fields inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
bambooAuthenticationContext, taskConfiguratorHelper
 
Constructor Summary
AbstractMavenBuildTaskConfigurator()
           
 
Method Summary
 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  void populateContextForAllOperations(java.util.Map<java.lang.String,java.lang.Object> context)
           
 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 setUiConfigSupport(UIConfigSupport uiConfigSupport)
           
 boolean taskProducesTestResults(TaskDefinition taskDefinition)
          Returns true iff task defined by TaskDefinition produces test results.
 void validate(ActionParametersMap params, ErrorCollection errorCollection)
          Validate the params submitted from the UI for this task definition
 
Methods inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
calculateRequirements, getI18nBean, setAuthenticationContext, setTaskConfiguratorHelper
 
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.BuildTaskRequirementSupport
calculateRequirements
 

Field Detail

DEFAULT_GOALS

public static final java.lang.String DEFAULT_GOALS
See Also:
Constant Field Values

CFG_TEST_RESULTS_FILE_PATTERN_OPTION_CUSTOM

public static final java.lang.String CFG_TEST_RESULTS_FILE_PATTERN_OPTION_CUSTOM
See Also:
Constant Field Values

CFG_TEST_RESULTS_FILE_PATTERN_OPTION_STANDARD

public static final java.lang.String CFG_TEST_RESULTS_FILE_PATTERN_OPTION_STANDARD
See Also:
Constant Field Values
Constructor Detail

AbstractMavenBuildTaskConfigurator

public AbstractMavenBuildTaskConfigurator()
Method Detail

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
Overrides:
generateTaskConfigMap in class AbstractTaskConfigurator
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
Overrides:
populateContextForCreate in class AbstractTaskConfigurator
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
Overrides:
populateContextForEdit in class AbstractTaskConfigurator
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
Overrides:
populateContextForView in class AbstractTaskConfigurator
Parameters:
context - map to put your context in.
taskDefinition - existing task definition

populateContextForAllOperations

protected void populateContextForAllOperations(@NotNull
                                               java.util.Map<java.lang.String,java.lang.Object> context)

calculateRequirements

@NotNull
public java.util.Set<Requirement> calculateRequirements(@NotNull
                                                                TaskDefinition taskDefinition,
                                                                @NotNull
                                                                Job job)
Description copied from class: AbstractTaskConfigurator
Provides default implementation of BuildTaskRequirementSupport.calculateRequirements(TaskDefinition, Job)

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

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
Overrides:
validate in class AbstractTaskConfigurator
Parameters:
params - - request paramaters
errorCollection - - collection to put any errors in.

taskProducesTestResults

public boolean taskProducesTestResults(@NotNull
                                       TaskDefinition taskDefinition)
Description copied from interface: TaskTestResultsSupport
Returns true iff task defined by TaskDefinition produces test results.

Specified by:
taskProducesTestResults in interface TaskTestResultsSupport

setUiConfigSupport

public void setUiConfigSupport(UIConfigSupport uiConfigSupport)


Copyright © 2012 Atlassian. All Rights Reserved.