Class 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 an TaskScheduleArgs object with the arguments provided by the user and updates the provided TaskScheduleUserData with the information provided by the user.
    • 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 ClientException
        Executes 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.