From 6c06c2c0fd1bfb5c261b910ee8092037184e70a5 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.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReverterUserData.java |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReverterUserData.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReverterUserData.java
index 9f26da1..363543e 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReverterUserData.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/upgrader/ReverterUserData.java
@@ -36,22 +36,42 @@
  */
 class ReverterUserData extends UserData {
 
-  File filesDir = null;
+  /** Directory where the reversion archive lives. */
+  private File reversionArchiveDir = null;
+
+  /** Indicates that we are reverting to the most recent version. */
+  private boolean mostRecent;
 
   /**
    * Gets the directory where the files are stored for the reversion.
    * @return File where the reversion files are kept
    */
-  public File getFilesDirectory() {
-    return filesDir;
+  public File getReversionArchiveDirectory() {
+    return reversionArchiveDir;
   }
 
   /**
    * Sets the directory where the files are stored for the reversion.
    * @param files where the reversion files are kept
    */
-  public void setFilesDirectory(File files) {
-    this.filesDir = files;
+  public void setReversionArchiveDirectory(File files) {
+    this.reversionArchiveDir = files;
+  }
+
+  /**
+   * Sets whether or not we will be reverting to the most recent version.
+   * @param mostRecent version or not
+   */
+  public void setRevertMostRecent(boolean mostRecent) {
+    this.mostRecent = mostRecent;
+  }
+
+  /**
+   * Indicates whether or not we will be reverting to the most recent version.
+   * @return boolean where true means revert to the most recent version
+   */
+  public boolean isRevertMostRecent() {
+    return this.mostRecent;
   }
 
 }

--
Gitblit v1.10.0