Class TaskTreeUtil
- java.lang.Object
-
- com.evolveum.midpoint.schema.util.task.TaskTreeUtil
-
public class TaskTreeUtil extends Object
Utilities related to task trees. They include working with subtasks.
-
-
Constructor Summary
Constructors Constructor Description TaskTreeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addSubtask(TaskType parent, TaskType child, PrismContext prismContext)
Adds a subtask to parent children list.static boolean
allSubtasksAreResolved(TaskType parent)
static TaskType
findChild(TaskType parent, String childOid)
static TaskType
findChildIfResolved(TaskType parent, String childOid)
static @NotNull Stream<TaskType>
getAllTasksStream(TaskType root)
Returns a stream of the task and all of its subtasks.static List<TaskType>
getResolvedSubtasks(TaskType parent)
Get resolved direct subtasks from a task.static List<TaskType>
getResolvedSubtasks(TaskType parent, TaskResolver taskResolver)
-
-
-
Method Detail
-
getAllTasksStream
@NotNull public static @NotNull Stream<TaskType> getAllTasksStream(TaskType root)
Returns a stream of the task and all of its subtasks. Expects that the subtasks are resolved into full objects. I.e. does not do task ID resolution itself: if a subtask is not already resolved, throws an exception.
-
getResolvedSubtasks
public static List<TaskType> getResolvedSubtasks(TaskType parent)
Get resolved direct subtasks from a task. Expects that the subtasks are resolved into full objects.
-
getResolvedSubtasks
public static List<TaskType> getResolvedSubtasks(TaskType parent, TaskResolver taskResolver)
-
addSubtask
public static void addSubtask(TaskType parent, TaskType child, PrismContext prismContext)
Adds a subtask to parent children list.
-
allSubtasksAreResolved
public static boolean allSubtasksAreResolved(TaskType parent)
-
-