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 Details

    • TaskTreeUtil

      public TaskTreeUtil()
  • Method Details

    • 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)
      Adds a subtask to parent children list.
    • findChild

      public static TaskType findChild(TaskType parent, String childOid)
    • findChildIfResolved

      public static TaskType findChildIfResolved(TaskType parent, String childOid)
    • allSubtasksAreResolved

      public static boolean allSubtasksAreResolved(TaskType parent)