From 0f7b83578af3a66529590cf0516dc8bc1b79b8c1 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Tue, 05 Jun 2007 21:02:26 +0000
Subject: [PATCH] This commit introduces several bits of quicksetup plumbing necessary to support the upgrader's interaction in asking the user whether they would like to cancel an upgrade if there are problems found:

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/GuiApplication.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

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 c5e5e5a..615b0d7 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
@@ -30,6 +30,8 @@
 import org.opends.quicksetup.*;
 import org.opends.quicksetup.util.ServerController;
 import org.opends.quicksetup.util.InProcessServerController;
+import org.opends.quicksetup.util.Utils;
+import org.opends.quicksetup.UserInteraction;
 import org.opends.quicksetup.webstart.WebStartDownloader;
 
 import javax.swing.*;
@@ -57,6 +59,9 @@
   /** Downloads .jar files for webstart application. */
   protected WebStartDownloader loader;
 
+  /** The QuickSetupDialog in control. */
+  private QuickSetupDialog qs;
+
   /**
    * Constructs an instance of an application.  Subclasses
    * of this application must have a default constructor.
@@ -512,4 +517,26 @@
     }
   }
 
+  /**
+   * {@inheritDoc}
+   */
+  protected UserInteraction userInteraction() {
+    UserInteraction ui = null;
+    if (!getUserData().isNoninteractive()) {
+      if (Utils.isCli()) {
+        ui = new CliUserInteraction();
+      } else {
+        ui = new GuiUserInteraction(qs.getFrame());
+      }
+    }
+    return ui;
+  }
+
+  /**
+   * Sets the QuickSetupDialog driving this application.
+   * @param dialog QuickSetupDialog driving this application
+   */
+  public void setQuickSetupDialog(QuickSetupDialog dialog) {
+    this.qs = dialog;
+  }
 }

--
Gitblit v1.10.0