Class TaskTreeUtil


  • public class TaskTreeUtil
    extends Object
    Utilities related to task trees. They include working with subtasks.
    • Constructor Detail

      • TaskTreeUtil

        public TaskTreeUtil()
    • 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.
      • addSubtask

        public static void addSubtask​(TaskType parent,
                                      TaskType child,
                                      PrismContext prismContext)
        Adds a subtask to parent children list.