From 626480f34c396fe1ce1214a4e9a5cff1428bc665 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 04 Jun 2015 16:49:43 +0000
Subject: [PATCH] Preparation work for OPENDJ-2094: add generic support for upgrade tasks that require confirmation.

---
 opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTask.java |   46 +++++++++++++++-------------------------------
 1 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTask.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTask.java
index a1c54a6..869369a 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/upgrade/UpgradeTask.java
@@ -21,7 +21,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2013-2014 ForgeRock AS
+ *      Copyright 2013-2015 ForgeRock AS
  */
 
 package org.opends.server.tools.upgrade;
@@ -61,42 +61,26 @@
   }
 
   /**
+   * Performs any preparation work required before performing the upgrade task, including
+   * interacting with the user where needed (e.g. in order to ask for confirmation), and throw a
+   * {@code ClientException} if the upgrade cannot proceed.
+   *
+   * @param context
+   *          Context through which tasks can interact with the server installation.
+   * @throws ClientException
+   *           If the upgrade cannot proceed.
+   */
+  void prepare(UpgradeContext context) throws ClientException;
+
+  /**
    * Performs this upgrade task.
    *
    * @param context
-   *          Context through which tasks can interact with the server
-   *          installation.
+   *          Context through which tasks can interact with the server installation.
    * @throws ClientException
    *           If an error occurred while performing the task.
    */
-  void perform(UpgradeContext context)
-      throws ClientException;
-
-  /**
-   * Verifies that this upgrade task can be completed or not.
-   *
-   * @param context
-   *          Context through which tasks can interact with the server
-   *          installation.
-   * @throws ClientException
-   *           If the upgrade cannot proceed.
-   */
-  void verify(UpgradeContext context)
-      throws ClientException;
-
-  /**
-   * Interacts with the user where needed (e.g. in order to ask for
-   * confirmation), and throw a {@code ClientException} if the upgrade cannot
-   * proceed.
-   *
-   * @param context
-   *          Context through which tasks can interact with the server
-   *          installation.
-   * @throws ClientException
-   *           If the upgrade cannot proceed.
-   */
-  void interact(UpgradeContext context)
-      throws ClientException;
+  void perform(UpgradeContext context) throws ClientException;
 
   /**
    * This method will be invoked after all upgrade tasks have completed

--
Gitblit v1.10.0