From 2a10590dbf762f008cf32db42bbb36b0579cb633 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Mon, 04 Jun 2007 08:05:35 +0000
Subject: [PATCH] This is another commit related to issue https://opends.dev.java.net/issues/show_bug.cgi?id=1334

---
 opends/src/ads/org/opends/admin/ads/DsServiceCliParser.java |   27 +++++++++++++++++++++------
 1 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/opends/src/ads/org/opends/admin/ads/DsServiceCliParser.java b/opends/src/ads/org/opends/admin/ads/DsServiceCliParser.java
index 63422c3..dcd402d 100644
--- a/opends/src/ads/org/opends/admin/ads/DsServiceCliParser.java
+++ b/opends/src/ads/org/opends/admin/ads/DsServiceCliParser.java
@@ -37,6 +37,7 @@
 import java.io.PrintStream;
 import java.util.HashSet;
 
+import org.opends.admin.ads.DsServiceCliReturnCode.ReturnCode;
 import org.opends.server.loggers.debug.DebugTracer;
 import org.opends.server.types.DebugLogLevel;
 import org.opends.server.util.PasswordReader;
@@ -198,7 +199,6 @@
     addGlobalArgument(verboseArg);
   }
 
-
   /**
    * Get the host name which has to be used for the command.
    *
@@ -215,7 +215,6 @@
     {
       return hostNameArg.getDefaultValue();
     }
-
   }
 
   /**
@@ -234,7 +233,6 @@
     {
       return portArg.getDefaultValue();
     }
-
   }
 
   /**
@@ -312,8 +310,8 @@
    *           If there is a problem with when trying to perform the
    *           operation.
    */
-  public int performSubCommand(ADSContext adsContext, OutputStream outStream,
-      OutputStream errStream)
+  public ReturnCode performSubCommand(ADSContext adsContext,
+      OutputStream outStream, OutputStream errStream)
     throws ADSContextException
   {
     SubCommand subCmd = getSubCommand();
@@ -329,6 +327,23 @@
 
     // Should never occurs: If we are here, it means that the code to
     // handle to subcommand is not yet written.
-    return 1;
+    return ReturnCode.ERROR_UNEXPECTED;
+  }
+
+  /**
+   * Indicate if the verbose mode is required.
+   *
+   * @return True if verbose mode is required
+   */
+  public boolean isVerbose()
+  {
+    if (verboseArg.isPresent())
+    {
+      return true;
+    }
+    else
+    {
+      return false ;
+    }
   }
 }

--
Gitblit v1.10.0