From 0f7b83578af3a66529590cf0516dc8bc1b79b8c1 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Tue, 05 Jun 2007 21:02:26 +0000
Subject: [PATCH] This commit introduces several bits of quicksetup plumbing necessary to support the upgrader's interaction in asking the user whether they would like to cancel an upgrade if there are problems found:

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
index 88245cb..e651e0e 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
@@ -68,7 +68,8 @@
     ArgumentParser ap = createArgumentParser();
     try {
       ap.parseArguments(args);
-
+      uud.setSilent(isSilent());
+      uud.setNoninteractive(isNoninteractive());
       if (localInstallPackFileNameArg.isPresent()) {
         String localInstallPackFileName =
                 localInstallPackFileNameArg.getValue();
@@ -87,31 +88,27 @@
       }
 
     } catch (ArgumentException e) {
-      e.printStackTrace(); // TODO remove
-      throw new UserDataException(null, "error parsing arguments");
+      throw new UserDataException(null, "Error parsing arguments");
     }
     return uud;
   }
 
   private ArgumentParser createArgumentParser() {
 
-    // Create the command-line argument parser for use with this program.
     String toolDescription = getMsg("upgrade-launcher-description");
-    ArgumentParser argParser =
-         new ArgumentParser("org.opends.quicksetup.upgrader.Upgrader",
-                 toolDescription,
-                 false);
+    ArgumentParser argParser = createArgumentParser(
+            "org.opends.quicksetup.upgrader.Upgrader",
+            toolDescription,
+            false);
 
-    // Initialize all the command-line argument types and register them with the
-    // parser.
-    // try {
+    // Initialize all the app specific command-line argument types
+    // and register them with the parser.
     try {
       localInstallPackFileNameArg =
-           new StringArgument("install package file",
-                   FILE_OPTION_SHORT, FILE_OPTION_LONG,
-                   false, true, "{install package file}", 0);
+              new StringArgument("install package file",
+                      FILE_OPTION_SHORT, FILE_OPTION_LONG,
+                      false, true, "{install package file}", 0);
       argParser.addArgument(localInstallPackFileNameArg);
-
     } catch (ArgumentException e) {
       LOG.log(Level.INFO, "error", e);
     }

--
Gitblit v1.10.0