Class TaskEntry

java.lang.Object
org.opends.server.tools.tasks.TaskEntry

public final class TaskEntry extends Object
Processes information from a task entry from the directory and provides accessors for attribute information. In some cases the data is formatted into more human-friendly formats.
  • Constructor Details

    • TaskEntry

      public TaskEntry(Entry entry)
      Creates a parameterized instance.
      Parameters:
      entry - to wrap
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getDN

      public Dn getDN()
      Returns the DN of the wrapped entry.
      Returns:
      the DN of the wrapped entry
    • getId

      public String getId()
      Returns the task's ID.
      Returns:
      the task's ID
    • getClassName

      public String getClassName()
      Returns the name of the class implementing the task represented here.
      Returns:
      the name of the class implementing the task represented here
    • getState

      public LocalizableMessage getState()
      Returns the state of the task as a string.
      Returns:
      the state of the task as a string
    • getScheduledStartTime

      public String getScheduledStartTime()
      Returns the human-friendly scheduled time string.
      Returns:
      the human-friendly scheduled time string
    • getActualStartTime

      public String getActualStartTime()
      Returns the human-friendly start time string.
      Returns:
      the human-friendly start time string
    • getCompletionTime

      public String getCompletionTime()
      Returns the human-friendly completion time string.
      Returns:
      the human-friendly completion time string
    • getScheduleTab

      public String getScheduleTab()
      Returns the recurring schedule tab in a string format.
      Returns:
      the recurring schedule tab in a string format
    • getDependencyIds

      public Set<String> getDependencyIds()
      Returns the IDs of tasks upon which this task depends.
      Returns:
      the IDs of tasks upon which this task depends
    • getFailedDependencyAction

      public LocalizableMessage getFailedDependencyAction()
      Returns the action to take if this task fails..
      Returns:
      the action to take if this task fails.
    • getLogMessages

      public List<LocalizableMessage> getLogMessages()
      Returns the logs associated with this task's execution.
      Returns:
      the logs associated with this task's execution
    • getCompletionNotificationEmailAddresses

      public Set<String> getCompletionNotificationEmailAddresses()
      Returns the email messages that will be used for notifications when the task completes.
      Returns:
      the email messages that will be used for notifications when the task completes
    • getErrorNotificationEmailAddresses

      public Set<String> getErrorNotificationEmailAddresses()
      Returns the email messages that will be used for notifications when the task encounters an error.
      Returns:
      the email messages that will be used for notifications when the task encounters an error
    • getType

      public LocalizableMessage getType()
      Returns a user presentable string indicating the type of this task.
      Returns:
      a user presentable string indicating the type of this task
    • getDescription

      public String getDescription()
      Returns the description of this task.
      Returns:
      the description of this task
    • isCancelable

      public boolean isCancelable()
      Returns whether this task supports being canceled.
      Returns:
      whether this task supports being canceled
    • getTaskSpecificAttributeValuePairs

      public Map<LocalizableMessage, List<String>> getTaskSpecificAttributeValuePairs()
      Gets a mapping of attributes that are specific to the implementing task as opposed to the superior, or base, task.
      Returns:
      mapping of attribute field labels to lists of string values for each field.
    • getTaskState

      public TaskState getTaskState()
      Returns the task state.
      Returns:
      the task state
    • isDone

      public boolean isDone()
      Returns whether this task is done.
      Returns:
      whether this task is done
    • parseTimeString

      public static Instant parseTimeString(String timeString) throws DateTimeParseException
      Parses a date time from its string representation.
      Parameters:
      timeString - the string to parse
      Returns:
      the date
      Throws:
      DateTimeParseException - if parsing fails
    • scheduledStartTimeComparator

      public static Comparator<TaskEntry> scheduledStartTimeComparator()
      Returns a task entry comparator that compares the scheduled start time of two task entries.
      Returns:
      a task entry comparator that compares the scheduled start time of two task entries