From 6df6635f1250c399a2f39d87d0534301ce4c22d7 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 31 Aug 2007 15:43:58 +0000
Subject: [PATCH] Exposes the reversion functionality of the upgrader (issue 2169). Originally it was intended to be exposed as a new script but in order to avoid the negativity of having a command devoted to undoing the upgrade and to avoid more scripts in the top-level directory, I've exposed the functionality as 2 new options in the existing upgrade script. I will update the Wiki with documentation for these new options soon.
---
opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java b/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java
index aa2a7eb..0e50637 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/upgrader/UpgradeUserData.java
@@ -36,9 +36,14 @@
*/
public class UpgradeUserData extends UserData {
- File installPackage;
+ /** Describes upgrade operation type. */
+ public enum Operation { UPGRADE, REVERSION };
- Build buildToDownload;
+ private File installPackage;
+
+ private Build buildToDownload;
+
+ private Operation operation;
/**
* Gets the OpenDS package (.zip) file whose contents will
@@ -87,4 +92,20 @@
return false;
}
+ /**
+ * Sets the operation the user would like to perform.
+ * @param operation upgrade or reversion
+ */
+ public void setOperation(Operation operation) {
+ this.operation = operation;
+ }
+
+ /**
+ * Gets the operation the user would like to perform.
+ * @return operation upgrade or reversion
+ */
+ public Operation getOperation() {
+ return this.operation;
+ }
+
}
--
Gitblit v1.10.0