From c97b0a37191be3d208647ecbd1788919aa8d0066 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 14 Sep 2007 16:03:44 +0000
Subject: [PATCH] finished registering the upgrade/reversion issue; fixed some typos and minor issues preventing the upgrader from notifying the user about the issue
---
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java | 6 ++++++
opendj-sdk/opends/src/server/org/opends/server/util/VersionCompatibilityIssue.java | 1 +
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java | 6 +++++-
opendj-sdk/opends/src/messages/messages/quicksetup.properties | 8 ++++----
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java | 6 +++++-
opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java | 2 +-
6 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/opendj-sdk/opends/src/messages/messages/quicksetup.properties b/opendj-sdk/opends/src/messages/messages/quicksetup.properties
index 73622a3..1d35119 100644
--- a/opendj-sdk/opends/src/messages/messages/quicksetup.properties
+++ b/opendj-sdk/opends/src/messages/messages/quicksetup.properties
@@ -1088,9 +1088,9 @@
INFO_REVERSION_ORACLE_WARNING=Reversion warning
INFO_REVERSION_ORACLE_ACTION=Upgrade requires manual action
INFO_REVERSION_ORACLE_INFO=Upgrade information
-INFO_REVERSION_ORACLE_UNSUPPORTED=Upgrade not supportedfrom version %s to \
+INFO_REVERSION_ORACLE_UNSUPPORTED=Reversion not supported from version %s to \
version %s is not supported. To upgrade You must uninstall the current \
- server, install the new server, and manually migrate your data.
+ server, install the new server, and manually migrate your data: %s
INFO_REVERSION_TYPE_PROMPT=How would you like to specify the archive used \
to revert this instance?
INFO_REVERSION_TYPE_PROMPT_RECENT=Use the most recent versioned archive
@@ -1102,9 +1102,9 @@
INFO_UPGRADE_ORACLE_INFO=Upgrade information
INFO_UPGRADE_ORACLE_SUCCESS=Upgrade from version %s to version %s is \
supported.
-INFO_UPGRADE_ORACLE_UNSUPPORTED=Upgrade not supportedfrom version %s to \
+INFO_UPGRADE_ORACLE_UNSUPPORTED=Upgrade not supported from version %s to \
version %s is not supported. To upgrade You must uninstall the current \
- server, install the new server, and manually migrate your data.
+ server, install the new server, and manually migrate your data: %s
INFO_UPGRADE_ORACLE_WARNING=Upgrade warning
INFO_UPGRADE_REVIEW_PANEL_INSTRUCTIONS=Review your settings and click Finish \
if they are correct.
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
index 3e2d081..add42d3 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java
@@ -578,7 +578,7 @@
*/
public UserInteraction userInteraction() {
UserInteraction ui = null;
- if (!getUserData().isInteractive()) {
+ if (getUserData().isInteractive()) {
if (Utils.isCli()) {
ui = new CliUserInteraction();
} else {
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
index c29fc1a..00b2f4e 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReversionIssueNotifier.java
@@ -74,17 +74,21 @@
if (hasIssues()) {
List<Directive> issues = getIssues();
if (!isSupported()) {
+ MessageBuilder reason = new MessageBuilder();
if (issues != null) {
for (Directive directive : issues) {
LOG.log(Level.INFO, "Unsupported reversion details: " +
directive.getMessage());
+ reason.append(directive.getMessage());
+ reason.append(EOL);
}
}
throw new ApplicationException(
ReturnCode.APPLICATION_ERROR,
INFO_REVERSION_ORACLE_UNSUPPORTED.get(
currentBuildInfo.toString(),
- newBuildInfo.toString()),
+ newBuildInfo.toString(),
+ reason.toMessage()),
null);
} else {
if (ui != null) {
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java
index c245ed7..241a7df 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeIssueNotifier.java
@@ -76,17 +76,21 @@
if (hasIssues()) {
List<Directive> issues = getIssues();
if (!isSupported()) {
+ MessageBuilder reason = new MessageBuilder();
if (issues != null) {
for (VersionIssueNotifier.Directive directive : issues) {
LOG.log(Level.INFO, "Unsupported upgrade details: " +
directive.getMessage());
+ reason.append(directive.getMessage());
+ reason.append(EOL);
}
}
throw new ApplicationException(
ReturnCode.APPLICATION_ERROR,
INFO_UPGRADE_ORACLE_UNSUPPORTED.get(
currentBuildInfo.toString(),
- newBuildInfo.toString()),
+ newBuildInfo.toString(),
+ reason.toMessage()),
null);
} else {
if (ui != null) {
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java
index 02d32df..ea3871f 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/VersionIssueNotifier.java
@@ -57,6 +57,12 @@
static private final Logger LOG =
Logger.getLogger(VersionIssueNotifier.class.getName());
+ /**
+ * End Of Line.
+ */
+ public static String EOL = System.getProperty("line.separator");
+
+
/** Descriptor for a directive. */
protected enum DirectiveType {
diff --git a/opendj-sdk/opends/src/server/org/opends/server/util/VersionCompatibilityIssue.java b/opendj-sdk/opends/src/server/org/opends/server/util/VersionCompatibilityIssue.java
index 5eb1792..77ec145 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/util/VersionCompatibilityIssue.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/util/VersionCompatibilityIssue.java
@@ -424,6 +424,7 @@
//***************************************************
static {
+ register(Cause.PROPERTY_CHANGE_1, new BuildVersion(1, 0, 0, 3053));
register(Cause.DB_FORMAT_CHANGE_2, new BuildVersion(0, 9, 0, 2049));
register(Cause.DB_FORMAT_CHANGE_1, new BuildVersion(0, 1, 0, 1582));
register(Cause.BERKLEY_UPGRADE_1, new BuildVersion(0, 1, 0, 890));
--
Gitblit v1.10.0