From 7b11fcf138a9310aa14d26fea3249d6073c38828 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Mon, 11 Apr 2016 17:22:17 +0000
Subject: [PATCH] Code cleanup

---
 opendj-server-legacy/src/main/java/org/opends/quicksetup/Application.java |   41 ++++++++++++++---------------------------
 1 files changed, 14 insertions(+), 27 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/Application.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/Application.java
index d3d281e..49634ab 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/Application.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/Application.java
@@ -21,7 +21,6 @@
 import static com.forgerock.opendj.cli.Utils.*;
 
 import java.io.ByteArrayOutputStream;
-import java.io.File;
 import java.io.PrintStream;
 import java.util.Map;
 import java.util.Set;
@@ -73,6 +72,9 @@
   private ErrorPrintStream err = new ErrorPrintStream();
   private OutputPrintStream out = new OutputPrintStream();
 
+  /** Temporary log file where messages will be logged. */
+  protected TempLogFile tempLogFile;
+
   /**
    * Creates an application by instantiating the Application class
    * denoted by the System property
@@ -574,32 +576,6 @@
   }
 
   /**
-   * Conditionally notifies listeners of the log file if it
-   * has been initialized.
-   */
-  protected void notifyListenersOfLog() {
-    File logFile = QuickSetupLog.getLogFile();
-    if (logFile != null) {
-      notifyListeners(getFormattedProgress(
-          INFO_GENERAL_SEE_FOR_DETAILS.get(logFile.getPath())));
-      notifyListeners(getLineBreak());
-    }
-  }
-
-  /**
-   * Conditionally notifies listeners of the log file if it
-   * has been initialized.
-   */
-  protected void notifyListenersOfLogAfterError() {
-    File logFile = QuickSetupLog.getLogFile();
-    if (logFile != null) {
-      notifyListeners(getFormattedProgress(
-          INFO_GENERAL_PROVIDE_LOG_IN_ERROR.get(logFile.getPath())));
-      notifyListeners(getLineBreak());
-    }
-  }
-
-  /**
    * Returns a localized representation of a TopologyCacheException object.
    * @param e the exception we want to obtain the representation from.
    * @return a localized representation of a TopologyCacheException object.
@@ -719,6 +695,17 @@
   }
 
   /**
+   * Sets the temporary log file where messages will be logged.
+   *
+   * @param tempLogFile
+   *            temporary log file where messages will be logged.
+   */
+  public void setTempLogFile(final TempLogFile tempLogFile)
+  {
+    this.tempLogFile = tempLogFile;
+  }
+
+  /**
    * This class is used to notify the ProgressUpdateListeners of events
    * that are written to the standard error.  It is used in OfflineInstaller.
    * These classes just create a ErrorPrintStream and

--
Gitblit v1.10.0