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 voidaddSubtask(TaskType parent, TaskType child, PrismContext prismContext)Adds a subtask to parent children list.static booleanallSubtasksAreResolved(TaskType parent)static TaskTypefindChild(TaskType parent, String childOid)static TaskTypefindChildIfResolved(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)
 
 - 
 
 -