com.atlassian.bamboo.task
Class TaskConfiguratorHelperImpl

java.lang.Object
  extended by com.atlassian.bamboo.task.TaskConfiguratorHelperImpl
All Implemented Interfaces:
TaskConfiguratorHelper

public class TaskConfiguratorHelperImpl
extends java.lang.Object
implements TaskConfiguratorHelper


Constructor Summary
TaskConfiguratorHelperImpl(com.opensymphony.xwork.TextProvider textProvider)
           
 
Method Summary
 void addJdkRequirement(java.util.Set<Requirement> requirements, TaskDefinition taskDefinition, java.lang.String cfgJdkLabel)
          Add JDK requirement if JDK was defined in task configuration
 void addSystemRequirementFromConfiguration(java.util.Set<Requirement> requirements, TaskDefinition taskDefinition, java.lang.String cfgKey, java.lang.String requirementPrefix)
          Add Executable requirement if Executable was defined in task configuration
 void populateContextWithConfiguration(java.util.Map<java.lang.String,java.lang.Object> context, TaskDefinition taskDefinition, java.lang.Iterable<java.lang.String> keys)
          Populate Freemarker context with selected data from task configuration.
 void populateTaskConfigMapWithActionParameters(java.util.Map<java.lang.String,java.lang.String> config, ActionParametersMap params, java.lang.Iterable<java.lang.String> keys)
          Populate task configuration with selected data from action parameters.
 void validateBuilderLabel(ActionParametersMap params, ErrorCollection errorCollection)
          Validate builder definition in action parameters
 void validateJdk(ActionParametersMap params, ErrorCollection errorCollection)
          Validate JDK definition in action parameters
 void validateTestResultsFilePattern(ActionParametersMap params, ErrorCollection errorCollection)
          Validate test results file pattern in action parameters
 void validateTestResultsFilePatternIfCustomPatternSelected(ActionParametersMap params, ErrorCollection errorCollection, java.lang.String cfgTestResultsFilePatternOptionCustom)
          Validate test results file pattern in action parameters when manual pattern is enabled by an option
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskConfiguratorHelperImpl

public TaskConfiguratorHelperImpl(com.opensymphony.xwork.TextProvider textProvider)
Method Detail

populateContextWithConfiguration

public void populateContextWithConfiguration(@NotNull
                                             java.util.Map<java.lang.String,java.lang.Object> context,
                                             @NotNull
                                             TaskDefinition taskDefinition,
                                             @NotNull
                                             java.lang.Iterable<java.lang.String> keys)
Description copied from interface: TaskConfiguratorHelper
Populate Freemarker context with selected data from task configuration.

Specified by:
populateContextWithConfiguration in interface TaskConfiguratorHelper
Parameters:
context - Freemarker context
taskDefinition - source of task configuration
keys - keys for which values has to be copied

populateTaskConfigMapWithActionParameters

public void populateTaskConfigMapWithActionParameters(@NotNull
                                                      java.util.Map<java.lang.String,java.lang.String> config,
                                                      @NotNull
                                                      ActionParametersMap params,
                                                      @NotNull
                                                      java.lang.Iterable<java.lang.String> keys)
Description copied from interface: TaskConfiguratorHelper
Populate task configuration with selected data from action parameters.

Specified by:
populateTaskConfigMapWithActionParameters in interface TaskConfiguratorHelper
Parameters:
config - task configuration
params - action parameters
keys - keys for which values has to be copied

addJdkRequirement

public void addJdkRequirement(@NotNull
                              java.util.Set<Requirement> requirements,
                              @NotNull
                              TaskDefinition taskDefinition,
                              @NotNull
                              java.lang.String cfgJdkLabel)
Description copied from interface: TaskConfiguratorHelper
Add JDK requirement if JDK was defined in task configuration

Specified by:
addJdkRequirement in interface TaskConfiguratorHelper
Parameters:
requirements - requirements to be modified
taskDefinition - task definition
cfgJdkLabel - name of configuration key that specifies JDK label

addSystemRequirementFromConfiguration

public void addSystemRequirementFromConfiguration(@NotNull
                                                  java.util.Set<Requirement> requirements,
                                                  @NotNull
                                                  TaskDefinition taskDefinition,
                                                  @NotNull
                                                  java.lang.String cfgKey,
                                                  @NotNull
                                                  java.lang.String requirementPrefix)
Description copied from interface: TaskConfiguratorHelper
Add Executable requirement if Executable was defined in task configuration

Specified by:
addSystemRequirementFromConfiguration in interface TaskConfiguratorHelper
Parameters:
requirements - requirements to be modified
taskDefinition - task definition
cfgKey - name of configuration key that specifies label of system requirement to be added
requirementPrefix - prefix of the system requirement

validateJdk

public void validateJdk(@NotNull
                        ActionParametersMap params,
                        @NotNull
                        ErrorCollection errorCollection)
Description copied from interface: TaskConfiguratorHelper
Validate JDK definition in action parameters

Specified by:
validateJdk in interface TaskConfiguratorHelper
Parameters:
params - action parameters
errorCollection - target for adding validation errors

validateBuilderLabel

public void validateBuilderLabel(@NotNull
                                 ActionParametersMap params,
                                 @NotNull
                                 ErrorCollection errorCollection)
Description copied from interface: TaskConfiguratorHelper
Validate builder definition in action parameters

Specified by:
validateBuilderLabel in interface TaskConfiguratorHelper
Parameters:
params - action parameters
errorCollection - target for adding validation errors

validateTestResultsFilePattern

public void validateTestResultsFilePattern(@NotNull
                                           ActionParametersMap params,
                                           @NotNull
                                           ErrorCollection errorCollection)
Description copied from interface: TaskConfiguratorHelper
Validate test results file pattern in action parameters

Specified by:
validateTestResultsFilePattern in interface TaskConfiguratorHelper
Parameters:
params - action parameters
errorCollection - target for adding validation errors

validateTestResultsFilePatternIfCustomPatternSelected

public void validateTestResultsFilePatternIfCustomPatternSelected(@NotNull
                                                                  ActionParametersMap params,
                                                                  @NotNull
                                                                  ErrorCollection errorCollection,
                                                                  @NotNull
                                                                  java.lang.String cfgTestResultsFilePatternOptionCustom)
Description copied from interface: TaskConfiguratorHelper
Validate test results file pattern in action parameters when manual pattern is enabled by an option

Specified by:
validateTestResultsFilePatternIfCustomPatternSelected in interface TaskConfiguratorHelper
Parameters:
params - action parameters
errorCollection - target for adding validation errors
cfgTestResultsFilePatternOptionCustom - value of an option that enables test results file pattern


Copyright © 2012 Atlassian. All Rights Reserved.