From c37b0d815d222d000d2a220e929b488ecff665c3 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Fri, 14 Feb 2014 15:29:34 +0000
Subject: [PATCH] 

---
 opendj3-server-dev/src/server/org/opends/server/admin/client/cli/TaskScheduleArgs.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/admin/client/cli/TaskScheduleArgs.java b/opendj3-server-dev/src/server/org/opends/server/admin/client/cli/TaskScheduleArgs.java
index f364845..d39fb81 100644
--- a/opendj3-server-dev/src/server/org/opends/server/admin/client/cli/TaskScheduleArgs.java
+++ b/opendj3-server-dev/src/server/org/opends/server/admin/client/cli/TaskScheduleArgs.java
@@ -42,10 +42,12 @@
 import org.opends.server.backends.task.RecurringTask;
 import org.opends.server.types.DirectoryException;
 import org.opends.server.util.StaticUtils;
+
 import com.forgerock.opendj.cli.Argument;
 import com.forgerock.opendj.cli.ArgumentException;
+import com.forgerock.opendj.cli.ReturnCode;
 import com.forgerock.opendj.cli.StringArgument;
-import com.forgerock.opendj.cli.CLIException;
+import com.forgerock.opendj.cli.ClientException;
 
 /**
  * A class that contains all the arguments related to the task scheduling.
@@ -173,11 +175,11 @@
    * to be launched as a task, the method {@link #validateArgsIfOffline()}
    * should be called instead of this method.
    * @throws ArgumentException if there is a problem with the arguments.
-   * @throws CLIException if there is a problem with one of the values provided
+   * @throws ClientException if there is a problem with one of the values provided
    * by the user.
    */
-  public void validateArgs()
-  throws ArgumentException, CLIException {
+  public void validateArgs() throws ArgumentException, ClientException
+  {
     if (startArg.isPresent() && !NOW.equals(startArg.getValue())) {
       try {
         Date date = StaticUtils.parseDateTimeString(startArg.getValue());
@@ -185,7 +187,7 @@
         Date currentDate = new Date(System.currentTimeMillis());
         if (currentDate.after(date))
         {
-          throw new CLIException(ERR_START_DATETIME_ALREADY_PASSED.get(
+          throw new ClientException(ReturnCode.ERROR_USER_DATA, ERR_START_DATETIME_ALREADY_PASSED.get(
               startArg.getValue()));
         }
       } catch (ParseException pe) {
@@ -251,11 +253,10 @@
    * This method covers all the checks done by {@link #validateArgs()}, so it
    * is not necessary to call that method if this method is being called.
    * @throws ArgumentException if there is a problem with the arguments.
-   * @throws CLIException if there is a problem with one of the values provided
+   * @throws ClientException if there is a problem with one of the values provided
    * by the user.
    */
-  public void validateArgsIfOffline()
-  throws ArgumentException, CLIException
+  public void validateArgsIfOffline() throws ArgumentException, ClientException
   {
     Argument[] incompatibleArgs = {startArg, recurringArg,
         completionNotificationArg,

--
Gitblit v1.10.0