From 426f6fff96db9c07683e5a27b8b745b3e13c29ff Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 08 Jun 2007 19:15:27 +0000
Subject: [PATCH] This commit address several related issues regarding the upgrader CLI:
---
opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java b/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
index cef2c78..b62f39d 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgraderCliHelper.java
@@ -29,14 +29,12 @@
import org.opends.quicksetup.CliApplicationHelper;
import org.opends.quicksetup.UserDataException;
-import org.opends.quicksetup.CurrentInstallStatus;
import org.opends.server.util.args.ArgumentParser;
import org.opends.server.util.args.StringArgument;
import org.opends.server.util.args.ArgumentException;
import java.util.logging.Level;
import java.util.logging.Logger;
-import java.io.File;
/**
* Assists Upgrader utility in CLI drudgery.
@@ -58,35 +56,20 @@
* Creates a set of user data from command line arguments and installation
* status.
* @param args String[] of arguments passed in from the command line
- * @param cis the current installation status
* @return UserData object populated to reflect the input args and status
* @throws UserDataException if something is wrong
*/
- public UpgradeUserData createUserData(String[] args, CurrentInstallStatus cis)
+ public UpgradeUserData createUserData(String[] args)
throws UserDataException {
UpgradeUserData uud = new UpgradeUserData();
ArgumentParser ap = createArgumentParser();
try {
ap.parseArguments(args);
uud.setSilent(isSilent());
- uud.setNoninteractive(isNoninteractive());
- if (localInstallPackFileNameArg.isPresent()) {
- String localInstallPackFileName =
- localInstallPackFileNameArg.getValue();
- File installPackFile = new File(localInstallPackFileName);
- if (!installPackFile.exists()) {
- throw new UserDataException(null,
- getMsg("build-extractor-error-file-no-exist",
- localInstallPackFileName));
- } else {
- uud.setInstallPackage(installPackFile);
- }
- } else {
- // TODO: ask the user for this information if non noninteractive
- throw new UserDataException(null,
- getMsg("error-option-required",
- "-" + FILE_OPTION_SHORT + "/--" + FILE_OPTION_LONG));
- }
+ uud.setInteractive(isInteractive());
+
+ // There is no need to check/validate the file argument
+ // since this is done by the BuildExtractor
} catch (ArgumentException e) {
throw new UserDataException(null, getMsg("error-parsing-options"));
--
Gitblit v1.10.0