com.atlassian.bamboo.fieldvalue
Class TaskConfigurationUtils

java.lang.Object
  extended by com.atlassian.bamboo.fieldvalue.TaskConfigurationUtils

@Internal
public class TaskConfigurationUtils
extends Object


Field Summary
static String TASK_CONFIG_ROOT
           
static String TASK_PREFIX
           
 
Method Summary
static void addTaskDefinitionsToConfig(List<TaskDefinition> taskDefinitions, org.apache.commons.configuration.HierarchicalConfiguration config, String taskPrefix)
          Adds tasks to a build configuration
static List<TaskDefinition> addTaskToList(List<TaskDefinition> originalTasks, TaskDefinition toAdd)
           
static void adjustFinalisingBar(List<TaskDefinition> tasks, long beforeId, long afterId)
           
static List<TaskDefinition> getNewTaskList(List<TaskDefinition> originalTasks, TaskDefinition toMove, long beforeId, long afterId, boolean isFinal)
           
static List<TaskDefinition> getTaskDefinitionsFromConfig(String taskPrefix, org.apache.commons.configuration.HierarchicalConfiguration fromConfig)
          Retrieves tasks from build configuration
static long getUniqueId(List<TaskDefinition> tasks)
          Returns id of task that is not used in provided list.
static void removeTasksFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
          Removes all tasks from build configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TASK_CONFIG_ROOT

public static final String TASK_CONFIG_ROOT
See Also:
Constant Field Values

TASK_PREFIX

public static final String TASK_PREFIX
See Also:
Constant Field Values
Method Detail

removeTasksFromConfig

public static void removeTasksFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
Removes all tasks from build configuration

Parameters:
config -

addTaskDefinitionsToConfig

public static void addTaskDefinitionsToConfig(@Nullable
                                              List<TaskDefinition> taskDefinitions,
                                              @NotNull
                                              org.apache.commons.configuration.HierarchicalConfiguration config,
                                              @NotNull
                                              String taskPrefix)
Adds tasks to a build configuration

Parameters:
taskDefinitions -
config -
taskPrefix -

getTaskDefinitionsFromConfig

@NotNull
public static List<TaskDefinition> getTaskDefinitionsFromConfig(String taskPrefix,
                                                                        org.apache.commons.configuration.HierarchicalConfiguration fromConfig)
Retrieves tasks from build configuration

Parameters:
taskPrefix -
fromConfig -
Returns:

getUniqueId

public static long getUniqueId(@NotNull
                               List<TaskDefinition> tasks)
Returns id of task that is not used in provided list.

Parameters:
tasks -
Returns:

addTaskToList

@NotNull
public static List<TaskDefinition> addTaskToList(@NotNull
                                                         List<TaskDefinition> originalTasks,
                                                         @NotNull
                                                         TaskDefinition toAdd)

adjustFinalisingBar

public static void adjustFinalisingBar(@NotNull
                                       List<TaskDefinition> tasks,
                                       long beforeId,
                                       long afterId)

getNewTaskList

@NotNull
public static List<TaskDefinition> getNewTaskList(@NotNull
                                                          List<TaskDefinition> originalTasks,
                                                          @NotNull
                                                          TaskDefinition toMove,
                                                          long beforeId,
                                                          long afterId,
                                                          boolean isFinal)


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