Package org.opends.server.tools.tasks
Class TaskEntry
- java.lang.Object
-
- org.opends.server.tools.tasks.TaskEntry
-
public 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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getActualStartTime()
Gets the human-friendly start time.String
getClassName()
Gets the name of the class implementing the task represented here.Set<String>
getCompletionNotificationEmailAddresses()
Gets the email messages that will be used for notifications when the task completes.String
getCompletionTime()
Gets the human-friendly completion time.Set<String>
getDependencyIds()
Gets the IDs of tasks upon which this task depends.String
getDescription()
Gets the description of this task.Dn
getDN()
Gets the DN of the wrapped entry.Set<String>
getErrorNotificationEmailAddresses()
Gets the email messages that will be used for notifications when the task encounters an error.LocalizableMessage
getFailedDependencyAction()
Gets the action to take if this task fails.String
getId()
Gets the ID of the task.List<LocalizableMessage>
getLogMessages()
Gets the logs associated with this task's execution.String
getScheduledStartTime()
Gets the human-friendly scheduled time.String
getScheduleTab()
Gets recurring schedule tab.LocalizableMessage
getState()
Gets the state of the task.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.TaskState
getTaskState()
Gets the task state.LocalizableMessage
getType()
Gets a user presentable string indicating the type of this task.int
hashCode()
boolean
isCancelable()
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>
scheduledStartTimeComparator()
Returns a task entry comparator that compares the scheduled start time of two task entries.
-
-
-
Constructor Detail
-
TaskEntry
public TaskEntry(Entry entry)
Creates a parameterized instance.- Parameters:
entry
- to wrap
-
-
Method Detail
-
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.
-
-