From 07572b1a1f310425277e769bc497f2256121f192 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Tue, 15 May 2007 20:32:42 +0000
Subject: [PATCH] This commit removes the Web Start version of the upgrader's ability to download arbitrary builds to be used for upgrading. Instead, the Web Start version of upgrade will be tied to the build version of upgrader. This is necessary after discovering that attemping to perform internal communication with the directory server when the DS bit and the upgraders bits are of different versions is problematic.
---
opends/src/quicksetup/org/opends/quicksetup/Installation.java | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 43 insertions(+), 1 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Installation.java b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
index 88b89c0..914e996 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Installation.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -606,6 +606,24 @@
}
/**
+ * Gets the file for invoking a particular command appropriate for
+ * the current operating system.
+ * @param command namd of the command
+ * @return File representing the command
+ */
+ public File getCommandFile(String command) {
+ File commandFile;
+ if (Utils.isWindows()) {
+ commandFile = new File(getBinariesDirectory(),
+ command + ".bat");
+ } else {
+ commandFile = new File(getBinariesDirectory(),
+ command);
+ }
+ return commandFile;
+ }
+
+ /**
* Gets the file responsible for stopping the server appropriate
* for the current operating system.
* @return File representing the stop command
@@ -700,7 +718,24 @@
* build information
*/
public BuildInformation getBuildInformation() throws ApplicationException {
- if (buildInformation == null) {
+ return getBuildInformation(true);
+ }
+
+ /**
+ * Gets information about the build that was used to produce the bits
+ * for this installation.
+ * @param useCachedVersion where true indicates that a potentially cached
+ * version of the build information is acceptable for use; false indicates
+ * the the build information will be created from scratch which is potentially
+ * time consuming
+ * @return BuildInformation object describing this installation
+ * @throws ApplicationException if there is a problem obtaining the
+ * build information
+ */
+ public BuildInformation getBuildInformation(boolean useCachedVersion)
+ throws ApplicationException
+ {
+ if (buildInformation == null || useCachedVersion == false) {
FutureTask<BuildInformation> ft = new FutureTask<BuildInformation>(
new Callable<BuildInformation>() {
public BuildInformation call() throws ApplicationException {
@@ -718,4 +753,11 @@
}
return buildInformation;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString() {
+ return Utils.getPath(rootDirectory);
+ }
}
\ No newline at end of file
--
Gitblit v1.10.0