| | |
| | | import org.opends.server.backends.task.RecurringTask; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.util.StaticUtils; |
| | | import com.forgerock.opendj.cli.CLIException; |
| | | |
| | | import com.forgerock.opendj.cli.ClientException; |
| | | import com.forgerock.opendj.cli.ReturnCode; |
| | | |
| | | import org.opends.server.util.cli.ConsoleApplication; |
| | | import org.opends.server.util.cli.MenuBuilder; |
| | | import org.opends.server.util.cli.MenuResult; |
| | |
| | | |
| | | /** |
| | | * Executes the interaction with the user. |
| | | * @throws CLIException if there is an error prompting the user. |
| | | * @throws ClientException if there is an error prompting the user. |
| | | */ |
| | | public void run() throws CLIException |
| | | public void run() throws ClientException |
| | | { |
| | | headerDisplayed = false; |
| | | |
| | |
| | | this.formatter = formatter; |
| | | } |
| | | |
| | | private void runFailedDependencyAction() throws CLIException |
| | | private void runFailedDependencyAction() throws ClientException |
| | | { |
| | | if (args.dependencyArg.isPresent()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void askForFailedDependencyAction() throws CLIException |
| | | private void askForFailedDependencyAction() throws ClientException |
| | | { |
| | | checkHeaderDisplay(); |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new CLIException(LocalizableMessage.EMPTY); |
| | | throw new ClientException(ReturnCode.TODO, LocalizableMessage.EMPTY); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void runDependency() throws CLIException |
| | | private void runDependency() throws ClientException |
| | | { |
| | | if (args.dependencyArg.isPresent()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void askForDependency() throws CLIException |
| | | private void askForDependency() throws ClientException |
| | | { |
| | | checkHeaderDisplay(); |
| | | |
| | |
| | | return taskIDDefined; |
| | | } |
| | | |
| | | private void runErrorNotification() throws CLIException |
| | | private void runErrorNotification() throws ClientException |
| | | { |
| | | if (args.errorNotificationArg.isPresent()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void askForErrorNotification() throws CLIException |
| | | private void askForErrorNotification() throws ClientException |
| | | { |
| | | List<String> addresses = |
| | | askForEmailNotification(INFO_HAS_ERROR_NOTIFICATION_PROMPT.get(), |
| | |
| | | } |
| | | |
| | | private List<String> askForEmailNotification(LocalizableMessage hasNotificationPrompt, |
| | | LocalizableMessage emailAddressPrompt) throws CLIException |
| | | LocalizableMessage emailAddressPrompt) throws ClientException |
| | | { |
| | | checkHeaderDisplay(); |
| | | |
| | |
| | | return addresses; |
| | | } |
| | | |
| | | private void runCompletionNotification() throws CLIException |
| | | private void runCompletionNotification() throws ClientException |
| | | { |
| | | if (args.completionNotificationArg.isPresent()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void askForCompletionNotification() throws CLIException |
| | | private void askForCompletionNotification() throws ClientException |
| | | { |
| | | List<String> addresses = |
| | | askForEmailNotification(INFO_HAS_COMPLETION_NOTIFICATION_PROMPT.get(), |
| | |
| | | uData.setNotifyUponCompletionEmailAddresses(addresses); |
| | | } |
| | | |
| | | private void runStartNowOrSchedule() throws CLIException |
| | | private void runStartNowOrSchedule() throws ClientException |
| | | { |
| | | if (args.startArg.isPresent()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void askToStartNowOrSchedule() throws CLIException |
| | | private void askToStartNowOrSchedule() throws ClientException |
| | | { |
| | | checkHeaderDisplay(); |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | throw new CLIException(LocalizableMessage.EMPTY); |
| | | throw new ClientException(ReturnCode.TODO, LocalizableMessage.EMPTY); |
| | | } |
| | | } |
| | | |
| | | private void askForStartDate() throws CLIException |
| | | private void askForStartDate() throws ClientException |
| | | { |
| | | checkHeaderDisplay(); |
| | | |
| | |
| | | uData.setStartDate(startDate); |
| | | } |
| | | |
| | | private void askForTaskSchedule() throws CLIException |
| | | private void askForTaskSchedule() throws ClientException |
| | | { |
| | | checkHeaderDisplay(); |
| | | |