From 5808bc275c42b3d12f23f9b04b7549417ea4c6dc Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 27 Apr 2007 21:30:01 +0000
Subject: [PATCH] implements code to access and parse the newly published upgrade build availability information published at http://www.opends.org/upgrade-builds
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ui/UpgraderReviewPanel.java | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ui/UpgraderReviewPanel.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ui/UpgraderReviewPanel.java
index 63324ad..bdb8aa9 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ui/UpgraderReviewPanel.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ui/UpgraderReviewPanel.java
@@ -71,8 +71,15 @@
*/
public void beginDisplay(UserData data) {
tcServerLocation.setText(getServerToUpgrade());
- tcOldBuild.setText(getOldBuildId());
- tcNewBuild.setText(getNewBuildId());
+
+ // Unfortunately these string are different. The
+ // old build string is the build ID (14 digit number)
+ // and the new build is the build display name that
+ // appears in the available builds information page.
+ // It is currently not feasible to correlate these.
+ tcOldBuild.setText(getOldBuildString());
+ tcNewBuild.setText(getNewBuildString());
+
}
/**
@@ -175,7 +182,7 @@
return getUserData().getServerLocation();
}
- private String getOldBuildId() {
+ private String getOldBuildString() {
String oldVersion;
try {
oldVersion = getApplication().getInstallation().getBuildId();
@@ -186,12 +193,17 @@
return oldVersion;
}
- private String getNewBuildId() {
+ /**
+ * Gets the string by which the new build is known in the
+ * available builds page.
+ * @return String indicating the new build
+ */
+ private String getNewBuildString() {
String newVersion;
UpgradeUserData uud = (UpgradeUserData)getUserData();
Build build = uud.getInstallPackageToDownload();
if (build != null) {
- newVersion = build.getId();
+ newVersion = build.getDisplayName();
} else {
// TODO: figure out the build from the zip somehow
newVersion = getMsg("upgrade-build-id-unknown");
--
Gitblit v1.10.0