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/ApplicationException.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java b/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java
index 75fbd42..06a6591 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ApplicationException.java
@@ -84,12 +84,28 @@
     WINDOWS_SERVICE_ERROR,
 
     /**
+     * Application specific error.
+     */
+    APPLICATION,
+
+    /**
      * A bug (for instance when we throw an IllegalStateException).
      */
     BUG
   }
 
   /**
+   * Creates a new ApplicationException of type FILE_SYSTEM_ERROR.
+   * @param msg localized exception message
+   * @param e Exception cause
+   * @return ApplicationException with Type property being FILE_SYSTEM_ERROR
+   */
+  public static ApplicationException createFileSystemException(String msg,
+                                                               Exception e) {
+    return new ApplicationException(Type.FILE_SYSTEM_ERROR, msg, e);
+  }
+
+  /**
    * The constructor of the ApplicationException.
    * @param type the type of error we have.
    * @param localizedMsg a localized string describing the problem.

--
Gitblit v1.10.0