Package org.opends.server.tools.tasks
Class TaskScheduleInteraction
- java.lang.Object
-
- org.opends.server.tools.tasks.TaskScheduleInteraction
-
public class TaskScheduleInteraction extends Object
A class that is in charge of interacting with the user to ask about scheduling options for a task.
It takes as argument anTaskScheduleArgsobject with the arguments provided by the user and updates the providedTaskScheduleUserDatawith the information provided by the user.
-
-
Constructor Summary
Constructors Constructor Description TaskScheduleInteraction(TaskScheduleUserData uData, TaskScheduleArgs args, ConsoleApplication app, org.forgerock.i18n.LocalizableMessage taskName)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProgressMessageFormattergetFormatter()Returns the formatter that is used to generate messages.List<? extends TaskEntry>getTaskEntries()Returns the task entries that are defined in the server.voidrun()Executes the interaction with the user.voidsetFormatter(ProgressMessageFormatter formatter)Sets the formatter that is used to generate messages.voidsetTaskEntries(List<? extends TaskEntry> taskEntries)Sets the task entries that are defined in the server.
-
-
-
Constructor Detail
-
TaskScheduleInteraction
public TaskScheduleInteraction(TaskScheduleUserData uData, TaskScheduleArgs args, ConsoleApplication app, org.forgerock.i18n.LocalizableMessage taskName)
Default constructor.- Parameters:
uData- the task schedule user data.args- the object with the arguments provided by the user. The code assumes that the arguments have already been parsed.app- the console application object used to prompt for data.taskName- the name of the task to be used in the prompt messages.
-
-
Method Detail
-
run
public void run() throws ClientExceptionExecutes the interaction with the user.- Throws:
ClientException- if there is an error prompting the user.
-
getTaskEntries
public List<? extends TaskEntry> getTaskEntries()
Returns the task entries that are defined in the server. These are used to prompt the user about the task dependencies.- Returns:
- the task entries that are defined in the server.
-
setTaskEntries
public void setTaskEntries(List<? extends TaskEntry> taskEntries)
Sets the task entries that are defined in the server. These are used to prompt the user about the task dependencies. If no task entries are provided, the user will not be prompted for task dependencies.- Parameters:
taskEntries- the task entries that are defined in the server.
-
getFormatter
public ProgressMessageFormatter getFormatter()
Returns the formatter that is used to generate messages.- Returns:
- the formatter that is used to generate messages.
-
setFormatter
public void setFormatter(ProgressMessageFormatter formatter)
Sets the formatter that is used to generate messages.- Parameters:
formatter- the formatter that is used to generate messages.
-
-