@Internal public class TaskConfigurationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TASK_CONFIG_ROOT |
static String |
TASK_PREFIX |
Modifier and Type | Method and Description |
---|---|
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 BambooEntityOid |
getMaxTaskOid(int serverKey)
Returns the max
BambooEntityOid that's currently in use of BambooEntityType.TASK type, with the
given server key. |
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
|
static Optional<List<TaskDefinition>> |
replaceCapabilityLabelInTasks(List<TaskDefinition> taskDefinitions,
String keyToReplace,
String oldCapabilityLabel,
String newCapabilityLabel,
String oldCapabilityKey,
String newCapabilityKey)
Replaces references to a capability in tasks from the list with a new capability key.
|
public static final String TASK_CONFIG_ROOT
public static final String TASK_PREFIX
public static void removeTasksFromConfig(org.apache.commons.configuration.HierarchicalConfiguration config)
config
- public static void addTaskDefinitionsToConfig(@Nullable List<TaskDefinition> taskDefinitions, @NotNull org.apache.commons.configuration.HierarchicalConfiguration config, @NotNull String taskPrefix)
taskDefinitions
- config
- taskPrefix
- @NotNull public static List<TaskDefinition> getTaskDefinitionsFromConfig(String taskPrefix, org.apache.commons.configuration.HierarchicalConfiguration fromConfig)
taskPrefix
- fromConfig
- public static long getUniqueId(@NotNull List<TaskDefinition> tasks)
tasks
- @NotNull public static List<TaskDefinition> addTaskToList(@NotNull List<TaskDefinition> originalTasks, @NotNull TaskDefinition toAdd)
public static void adjustFinalisingBar(@NotNull List<TaskDefinition> tasks, long beforeId, long afterId)
@NotNull public static List<TaskDefinition> getNewTaskList(@NotNull List<TaskDefinition> originalTasks, @NotNull TaskDefinition toMove, long beforeId, long afterId, boolean isFinal)
@Nullable public static BambooEntityOid getMaxTaskOid(int serverKey)
BambooEntityOid
that's currently in use of BambooEntityType.TASK
type, with the
given server key.
Returns null if no OIDs are in use of this type with the given server key.@NotNull public static Optional<List<TaskDefinition>> replaceCapabilityLabelInTasks(@NotNull List<TaskDefinition> taskDefinitions, @NotNull String keyToReplace, @NotNull String oldCapabilityLabel, @NotNull String newCapabilityLabel, @NotNull String oldCapabilityKey, @NotNull String newCapabilityKey)
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.