Class TaskInformation

java.lang.Object
com.evolveum.midpoint.schema.util.task.TaskInformation
All Implemented Interfaces:
DebugDumpable, Serializable
Direct Known Subclasses:
ActivityBasedTaskInformation, LegacyTaskInformation

public abstract class TaskInformation extends Object implements DebugDumpable, Serializable
Contains all non-trivial task information (progress, workers, overall status, and so on) needed for the use of GUI and reporting. This is a kind of middle layer (or "API") that isolates higher layers (GUI, reporting) from the details of data representation at the level of tasks and activities. It also hides the complexities induced by the transition from tasks-based approach to activities-based one, namely the existence of legacy tasks that live outside of the new activity framework. Instances of this class can be created in one of two ways: 1. For a root task (either activity-based or not), 2. For any subtask in hierarchy (either persistent or not, activity-based or not). The task(s) provided here may have subtasks resolved or not. If possible, we try to do our best to extract as much information as possible. But currently we are quite limited. E.g. we ignore the subtasks that were loaded.
See Also:
  • Field Details

    • task

      @NotNull protected final @NotNull TaskType task
      The original task.
    • workersInformation

      @NotNull protected final @NotNull ActivityWorkersInformation workersInformation
      Workers information covering this task and its subtasks.
    • overallStatus

      @NotNull protected final @NotNull OperationResultStatusType overallStatus
      Result status covering this task and its subtasks.
  • Constructor Details

  • Method Details

    • createForTask

      @NotNull public static @NotNull TaskInformation createForTask(@NotNull @NotNull TaskType task, @Nullable @Nullable TaskType rootTask)
    • debugDump

      public String debugDump(int indent)
      Specified by:
      debugDump in interface DebugDumpable
    • getTask

      @NotNull public @NotNull TaskType getTask()
    • getProgressDescriptionShort

      public String getProgressDescriptionShort()
      Returns short description of progress of the task and its children.
    • getProgressDescription

      public abstract String getProgressDescription(boolean longForm)
    • getAllErrors

      public abstract Integer getAllErrors()
      Returns number of items failed to be processed by the task and its children, if known. BEWARE: Fatal errors (e.g. resource not found for import task) are not counted here.
    • getNodesDescription

      public String getNodesDescription()
      Returns textual form of information about nodes on which the task and its children execute.
    • getCompletelyStalledSince

      @Nullable public @Nullable XMLGregorianCalendar getCompletelyStalledSince()
      Returns the "stalled since" information for the task and its children.
    • getResultStatus

      @NotNull public @NotNull OperationResultStatusType getResultStatus()
      Returns the overall status of the task with its children that is displayable to the user.
    • getStartTimestamp

      public abstract XMLGregorianCalendar getStartTimestamp()
      Returns the "start timestamp", whatever that means. Currently it is the execution start for trivial tasks (a single non-bucketed activity, or a legacy task); and realization start otherwise.
    • getEndTimestamp

      public abstract XMLGregorianCalendar getEndTimestamp()
      Returns the "end timestamp" with the analogous semantics to getStartTimestamp().
    • getLiveSyncToken

      public abstract Object getLiveSyncToken()