From fd724f1439c50c1d9dcf076d42c1bff6de2482d3 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 23 Oct 2007 20:56:26 +0000
Subject: [PATCH] Fix for issue 2494.

---
 opends/src/guitools/org/opends/guitools/statuspanel/StatusCliArgumentParser.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/statuspanel/StatusCliArgumentParser.java b/opends/src/guitools/org/opends/guitools/statuspanel/StatusCliArgumentParser.java
index 6b13f96..5e59fee 100644
--- a/opends/src/guitools/org/opends/guitools/statuspanel/StatusCliArgumentParser.java
+++ b/opends/src/guitools/org/opends/guitools/statuspanel/StatusCliArgumentParser.java
@@ -49,6 +49,11 @@
   private BooleanArgument noPromptArg;
 
   /**
+   * The 'scriptFriendly' argument.
+   */
+  private BooleanArgument scriptFriendlyArg;
+
+  /**
    * Creates a new instance of this argument parser with no arguments.
    *
    * @param mainClassName
@@ -86,6 +91,12 @@
         ToolConstants.OPTION_LONG_NO_PROMPT,
         INFO_DESCRIPTION_NO_PROMPT.get());
     defaultArgs.add(0, noPromptArg);
+    scriptFriendlyArg = new BooleanArgument(
+        "script-friendly",
+        's',
+        "script-friendly",
+        INFO_DESCRIPTION_SCRIPT_FRIENDLY.get());
+    defaultArgs.add(1, scriptFriendlyArg);
     initializeGlobalArguments(defaultArgs);
   }
 
@@ -101,6 +112,17 @@
   }
 
   /**
+   * Tells whether the user specified to have a script-friendly output or not.
+   * This method must be called after calling parseArguments.
+   * @return <CODE>true</CODE> if the user specified to have a script-friendly
+   * output and <CODE>false</CODE> otherwise.
+   */
+  public boolean isScriptFriendly()
+  {
+    return scriptFriendlyArg.isPresent();
+  }
+
+  /**
    * Returns the first server bind dn explicitly provided in the enable
    * replication subcommand.
    * @return the first server bind dn explicitly provided in the enable

--
Gitblit v1.10.0