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()
      Gets the DN of the wrapped entry.
      Returns:
      DN of entry
    • getId

      public String getId()
      Gets the ID of the task.
      Returns:
      String ID of the task
    • getClassName

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

      public LocalizableMessage getState()
      Gets the state of the task.
      Returns:
      LocalizableMessage representing state
    • getScheduledStartTime

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

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

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

      public String getScheduleTab()
      Gets recurring schedule tab.
      Returns:
      LocalizableMessage tab string
    • getDependencyIds

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

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

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

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

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

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

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

      public boolean isCancelable()
      Indicates whether this task supports a cancel operation.
      Returns:
      boolean where true means 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()
      Gets the task state.
      Returns:
      TaskState of task
    • isDone

      public boolean isDone()
      Indicates whether this task is done.
      Returns:
      boolean where true means 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.