com.atlassian.bamboo.plugins.testresultparser.task.configuration
Class TestResultsParserTaskConfigurator

java.lang.Object
  extended by com.atlassian.bamboo.task.AbstractTaskConfigurator
      extended by com.atlassian.bamboo.plugins.testresultparser.task.configuration.TestResultsParserTaskConfigurator
All Implemented Interfaces:
TaskConfigurator, TaskTestResultsSupport
Direct Known Subclasses:
TestNGTestResultsParserTaskConfigurator

public class TestResultsParserTaskConfigurator
extends AbstractTaskConfigurator
implements TaskTestResultsSupport


Field Summary
 
Fields inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
bambooAuthenticationContext, taskConfiguratorHelper
 
Constructor Summary
TestResultsParserTaskConfigurator()
           
 
Method Summary
 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.
 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 populateContextForView(Map<String,Object> context, TaskDefinition taskDefinition)
          Provide any required context to be used when rendering the freemarker template for viewing a task definition
 void setI18nResolver(com.atlassian.sal.api.message.I18nResolver i18nResolver)
           
 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
protected  void validateTestResultsFilePattern(ActionParametersMap params, ErrorCollection errorCollection)
           
 
Methods inherited from class com.atlassian.bamboo.task.AbstractTaskConfigurator
calculateRequirements, calculateRequirements, getI18nBean, setAuthenticationContext, setTaskConfiguratorHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestResultsParserTaskConfigurator

public TestResultsParserTaskConfigurator()
Method Detail

generateTaskConfigMap

@NotNull
public Map<String,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

populateContextForView

public void populateContextForView(@NotNull
                                   Map<String,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

populateContextForEdit

public void populateContextForEdit(@NotNull
                                   Map<String,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

populateContextForCreate

public void populateContextForCreate(@NotNull
                                     Map<String,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.

validateTestResultsFilePattern

protected void validateTestResultsFilePattern(@NotNull
                                              ActionParametersMap params,
                                              @NotNull
                                              ErrorCollection errorCollection)

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

setI18nResolver

public void setI18nResolver(com.atlassian.sal.api.message.I18nResolver i18nResolver)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.