From 43e8cc1e0b7576d94c96f07f64b25affb5b07af0 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 06 Apr 2007 19:09:13 +0000
Subject: [PATCH] - There are 3 new classes for describing an instance of OpenDS:  Installation which describes the filesystem, Status which can answer questions like 'is the server running' and Configuration which represents an instance of config.ldif.  Part of the implementations of these classes were pulled from CurrentInstallStatus, Installer and Utils with some new methods to support upgrader needs.  There is still some overlap in functionality that I don't like but my attempt at converting the exiting applications to use the new classes ran into problems so I leave that for a future exercise.

---
 opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
index d7cd0c9..6624437 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartInstaller.java
@@ -40,6 +40,7 @@
 import org.opends.quicksetup.installer.InstallProgressStep;
 import org.opends.quicksetup.util.Utils;
 import org.opends.quicksetup.util.ZipExtractor;
+import org.opends.quicksetup.util.ServerController;
 
 /**
  * This is an implementation of the Installer class that is used to install
@@ -141,7 +142,7 @@
       {
         notifyListeners(getTaskSeparator());
         status = InstallProgressStep.STARTING_SERVER;
-        startServer();
+        new ServerController(this).startServer();
       }
 
       if (Utils.isWindows())
@@ -371,7 +372,7 @@
     ZipExtractor extractor =
             new ZipExtractor(is, minRatio, maxRatio,
             getUserData().getServerLocation(),
-            getNumberZipEntries(),
+            Utils.getNumberZipEntries(),
             getZipFileName(),
             this);
     extractor.extract();
@@ -423,17 +424,6 @@
   }
 
   /**
-   * Returns the number of entries contained in the zip file.  This is used to
-   * update properly the progress bar ratio.
-   * @return the number of entries contained in the zip file.
-   */
-  private int getNumberZipEntries()
-  {
-    // TODO  we should get this dynamically during build
-    return 83;
-  }
-
-  /**
    * {@inheritDoc}
    */
   protected String getInstallationPath()

--
Gitblit v1.10.0