Package org.opends.server.tools.tasks
Class TaskEntry
java.lang.Object
org.opends.server.tools.tasks.TaskEntry
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the human-friendly start time.Gets the name of the class implementing the task represented here.Gets the email messages that will be used for notifications when the task completes.Gets the human-friendly completion time.Gets the IDs of tasks upon which this task depends.Gets the description of this task.getDN()
Gets the DN of the wrapped entry.Gets the email messages that will be used for notifications when the task encounters an error.Gets the action to take if this task fails.getId()
Gets the ID of the task.Gets the logs associated with this task's execution.Gets the human-friendly scheduled time.Gets recurring schedule tab.getState()
Gets the state of the task.Gets a mapping of attributes that are specific to the implementing task as opposed to the superior, or base, task.Gets the task state.getType()
Gets a user presentable string indicating the type of this task.int
hashCode()
boolean
Indicates whether this task supports a cancel operation.boolean
isDone()
Indicates whether this task is done.static Instant
parseTimeString
(String timeString) Parses a date time from its string representation.static Comparator<TaskEntry>
Returns a task entry comparator that compares the scheduled start time of two task entries.
-
Constructor Details
-
TaskEntry
Creates a parameterized instance.- Parameters:
entry
- to wrap
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getDN
Gets the DN of the wrapped entry.- Returns:
- DN of entry
-
getId
Gets the ID of the task.- Returns:
- String ID of the task
-
getClassName
Gets the name of the class implementing the task represented here.- Returns:
- String name of class
-
getState
Gets the state of the task.- Returns:
- LocalizableMessage representing state
-
getScheduledStartTime
Gets the human-friendly scheduled time.- Returns:
- String time
-
getActualStartTime
Gets the human-friendly start time.- Returns:
- String time
-
getCompletionTime
Gets the human-friendly completion time.- Returns:
- String time
-
getScheduleTab
Gets recurring schedule tab.- Returns:
- LocalizableMessage tab string
-
getDependencyIds
Gets the IDs of tasks upon which this task depends.- Returns:
- array of IDs
-
getFailedDependencyAction
Gets the action to take if this task fails.- Returns:
- String action
-
getLogMessages
Gets the logs associated with this task's execution.- Returns:
- array of log messages
-
getCompletionNotificationEmailAddresses
Gets the email messages that will be used for notifications when the task completes.- Returns:
- array of email addresses
-
getErrorNotificationEmailAddresses
Gets the email messages that will be used for notifications when the task encounters an error.- Returns:
- array of email addresses
-
getType
Gets a user presentable string indicating the type of this task.- Returns:
- LocalizableMessage type
-
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
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
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
Parses a date time from its string representation.- Parameters:
timeString
- the string to parse- Returns:
- the date
- Throws:
DateTimeParseException
- if parsing fails
-
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.
-