From a02a041d4e623925c395a14483c5b8c8b1c2f1cc Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Fri, 07 Feb 2014 16:45:44 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1303 - ConsoleApplication : Added/renamed functions to dissociate output stream from the error stream.

---
 opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java |   62 ++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 5 deletions(-)

diff --git a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java
index fa3e472..883923e 100755
--- a/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java
+++ b/opendj-cli/src/main/java/com/forgerock/opendj/cli/ConsoleApplication.java
@@ -188,14 +188,14 @@
      * @param msg
      *            The message.
      */
-    public final void print(final LocalizableMessage msg) {
+    public final void errPrint(final LocalizableMessage msg) {
         err.print(wrapText(msg, MAX_LINE_WIDTH));
     }
 
     /**
      * Displays a blank line to the error stream.
      */
-    public final void println() {
+    public final void errPrintln() {
         err.println();
     }
 
@@ -205,7 +205,7 @@
      * @param msg
      *            The message.
      */
-    public final void println(final LocalizableMessage msg) {
+    public final void errPrintln(final LocalizableMessage msg) {
         err.println(wrapText(msg, MAX_LINE_WIDTH));
     }
 
@@ -218,7 +218,7 @@
      * @param indent
      *            The number of columns to indent.
      */
-    public final void println(final LocalizableMessage msg, final int indent) {
+    public final void errPrintln(final LocalizableMessage msg, final int indent) {
         err.println(wrapText(msg, MAX_LINE_WIDTH, indent));
     }
 
@@ -228,13 +228,65 @@
      * @param msg
      *            The verbose message.
      */
-    public final void printVerboseMessage(final LocalizableMessage msg) {
+    public final void errPrintVerboseMessage(final LocalizableMessage msg) {
         if (isVerbose() || isInteractive()) {
             err.println(wrapText(msg, MAX_LINE_WIDTH));
         }
     }
 
     /**
+     * Displays a message to the output stream.
+     *
+     * @param msg
+     *            The message.
+     */
+    public final void print(final LocalizableMessage msg) {
+        out.print(wrapText(msg, MAX_LINE_WIDTH));
+    }
+
+    /**
+     * Displays a blank line to the output stream.
+     */
+    public final void println() {
+        out.println();
+    }
+
+    /**
+     * Displays a message to the output stream.
+     *
+     * @param msg
+     *            The message.
+     */
+    public final void println(final LocalizableMessage msg) {
+        out.println(wrapText(msg, MAX_LINE_WIDTH));
+    }
+
+    /**
+     * Displays a message to the output stream indented by the specified number
+     * of columns.
+     *
+     * @param msg
+     *            The message.
+     * @param indent
+     *            The number of columns to indent.
+     */
+    public final void println(final LocalizableMessage msg, final int indent) {
+        out.println(wrapText(msg, MAX_LINE_WIDTH, indent));
+    }
+
+    /**
+     * Displays a message to the output stream if verbose mode is enabled.
+     *
+     * @param msg
+     *            The verbose message.
+     */
+    public final void printVerboseMessage(final LocalizableMessage msg) {
+        if (isVerbose() || isInteractive()) {
+            out.println(wrapText(msg, MAX_LINE_WIDTH));
+        }
+    }
+
+    /**
      * Interactively prompts (on error output) the user to provide a string
      * value. Any non-empty string will be allowed (the empty string will
      * indicate that the default should be used, if there is one).

--
Gitblit v1.10.0