From 66ad41503e32e26e11405b497a9592d98e2d05a0 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 29 Aug 2007 17:54:56 +0000
Subject: [PATCH] Move the no option constant definition to ToolConstants. Refactor some code and put it in CliApplicationHelper. Fix some minor bugs in the output of the command-lines.

---
 opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java |   59 +++--------------------------------------------------------
 1 files changed, 3 insertions(+), 56 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java b/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
index 2999b50..ab60d50 100644
--- a/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
+++ b/opends/src/guitools/org/opends/guitools/replicationcli/ReplicationCliMain.java
@@ -299,64 +299,11 @@
   }
 
   /**
-   * Displays an error message in the error output (wrapping it if necessary).
-   * @param msg the error message to be displayed.
+   * {@inheritDoc}
    */
-  protected void printErrorMessage(Message msg)
+  protected boolean isQuiet()
   {
-    err.println(org.opends.server.util.StaticUtils.wrapText(msg,
-        Utils.getCommandLineMaxLineWidth()));
-    LOG.log(Level.SEVERE, msg.toString());
-  }
-
-  /**
-   * Displays a progress message in the error output (wrapping it if necessary).
-   * @param msg the error message to be displayed.
-   */
-  protected void printProgressMessage(Message msg)
-  {
-    if (!argParser.isQuiet())
-    {
-      out.print(org.opends.server.util.StaticUtils.wrapText(msg,
-          Utils.getCommandLineMaxLineWidth()));
-      out.flush();
-    }
-    LOG.log(Level.INFO, msg.toString());
-  }
-
-  /**
-   * Prints a line break in the standard output if we are not in quite mode.
-   */
-  protected void printProgressLineBreak()
-  {
-    if (!argParser.isQuiet())
-    {
-      out.println();
-    }
-  }
-
-  /**
-   * Displays a warning message in the error output (wrapping it if necessary).
-   * @param msg the warning message to be displayed.
-   */
-  protected void printWarningMessage(Message msg)
-  {
-    if (!argParser.isQuiet())
-    {
-      // TODO: decide if even in quiet mode we must display this message or not.
-      out.print(org.opends.server.util.StaticUtils.wrapText(msg,
-          Utils.getCommandLineMaxLineWidth()));
-      out.flush();
-    }
-    LOG.log(Level.WARNING, msg.toString());
-  }
-
-  /**
-   * Prints a line break in the standard output.
-   */
-  protected void printLineBreak()
-  {
-    out.println();
+    return argParser.isQuiet();
   }
 
   /**

--
Gitblit v1.10.0