From 2173aa3140a1a35176921dfb8f2f9278b6973d73 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 12 Nov 2007 04:26:49 +0000
Subject: [PATCH] Update the dsreplication command-line to be consistent with dsconfig in the use of menus and in the order that questions to connect to the servers. Update the upgrade to use the same menus as the other command-lines. Do some minor changes in the uninstall command-line in order to be more consistent with dsconfig in the order where the connection parameters are provided. Fix a bug in ApplicationTrustManager related to the accepted certificates when there is a mismatch between the certificate and the host name. Do some refactorization of the code and remove the CliApplicationHelper class so that we use ConsoleApplication everywhere.

---
 opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java |   32 +++++---------------------------
 1 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java b/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
index 8eccf45..48daa75 100644
--- a/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
+++ b/opends/src/guitools/org/opends/guitools/uninstaller/UninstallerArgumentParser.java
@@ -38,7 +38,6 @@
 
 import org.opends.messages.Message;
 import org.opends.messages.MessageBuilder;
-import org.opends.quicksetup.Constants;
 import org.opends.quicksetup.UserData;
 import org.opends.server.admin.client.cli.SecureConnectionCliArgs;
 import org.opends.server.admin.client.cli.SecureConnectionCliParser;
@@ -66,10 +65,6 @@
   private BooleanArgument removeBackupFilesArg;
   private BooleanArgument removeLDIFFilesArg;
 
-  /**
-   * The 'admin UID' global argument.
-   */
-  StringArgument adminUidArg;
   private StringArgument referencedHostNameArg;
 
   /**
@@ -180,22 +175,19 @@
         INFO_UNINSTALLDS_DESCRIPTION_QUIET.get());
     args.add(quietArg);
 
-    adminUidArg = new StringArgument("adminUID", 'I',
-        OPTION_LONG_ADMIN_UID, false, false, true, "adminUID",
-        Constants.GLOBAL_ADMIN_UID, null, INFO_DESCRIPTION_ADMIN_UID.get());
-
     ArrayList<Argument> defaultArgs =
-      new ArrayList<Argument>(createGlobalArguments(System.err));
+      new ArrayList<Argument>(createGlobalArguments(outStream));
     int index = defaultArgs.indexOf(secureArgsList.bindDnArg);
     if (index != -1)
     {
-      defaultArgs.add(index, adminUidArg);
+      defaultArgs.add(index, secureArgsList.adminUidArg);
       defaultArgs.remove(secureArgsList.bindDnArg);
     }
     else
     {
-      defaultArgs.add(adminUidArg);
+      defaultArgs.add(secureArgsList.adminUidArg);
     }
+    secureArgsList.adminUidArg.setHidden(false);
     defaultArgs.remove(secureArgsList.hostNameArg);
     defaultArgs.remove(secureArgsList.portArg);
     defaultArgs.remove(verboseArg);
@@ -324,26 +316,12 @@
   }
 
   /**
-   * Returns the Administrator UID provided in the command-line.
-   * @return the Administrator UID provided in the command-line.
-   */
-  public String getAdministratorUID()
-  {
-    String uid = null;
-    if (adminUidArg.isPresent())
-    {
-      uid = adminUidArg.getValue();
-    }
-    return uid;
-  }
-
-  /**
    * Returns the default Administrator UID value.
    * @return the default Administrator UID value.
    */
   public String getDefaultAdministratorUID()
   {
-    return adminUidArg.getDefaultValue();
+    return secureArgsList.adminUidArg.getDefaultValue();
   }
 
   /**

--
Gitblit v1.10.0