From efde227b9d0180122362133a750c6b322601c883 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Thu, 19 Jul 2007 20:28:20 +0000
Subject: [PATCH] This initial implementation lays most of the groundwork necessary for signaling information and actions to the user during upgrade and reversion.  However the only public effect this code has on the current upgrade tool is an informational dialog dialog if an upgrade is attempted from a build prior to one of the issues (2049, 1582, 890).

---
 opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java b/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java
index 516c8e7..06774c8 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/CliUserInteraction.java
@@ -94,10 +94,9 @@
               viewDetailsOption != null ? viewDetailsOption : "View Details"));
     }
 
+    println(summary);
     println();
-    println(Utils.stripHtml(summary));
-    println();
-    println(Utils.stripHtml(details));
+    println(details);
 
     String returnValue = null;
     while (returnValue == null) {
@@ -106,8 +105,8 @@
         println(o);
       }
       System.out.print(getMsg("cli-uninstall-confirm-prompt",
-          new String[] {"Enter a number or press Enter to accept the default",
-                  Integer.toString(defInt)}));
+              "Enter a number or press Enter to accept the default",
+              Integer.toString(defInt)));
 
       System.out.flush();
 
@@ -133,7 +132,20 @@
     return returnValue;
   }
 
-
+  /**
+   * {@inheritDoc}
+   */
+  public String createUnorderedList(List list) {
+    StringBuilder sb = new StringBuilder();
+    if (list != null) {
+      for (Object o : list) {
+        sb.append(/*bullet=*/"\u2022 ");
+        sb.append(o.toString());
+        sb.append(Constants.LINE_SEPARATOR);
+      }
+    }
+    return sb.toString();
+  }
 
   private String createOption(int index, String option) {
     return new StringBuilder().
@@ -147,7 +159,10 @@
   }
 
   private void println(String text) {
-    out.println(StaticUtils.wrapText(text, Utils.getCommandLineMaxLineWidth()));
+    text = Utils.convertHtmlBreakToLineSeparator(text);
+    text = Utils.stripHtml(text);
+    text = StaticUtils.wrapText(text, Utils.getCommandLineMaxLineWidth());
+    out.println(text);
   }
 
 }

--
Gitblit v1.10.0