From 81d36161ce5367fa7aa9a5d99dc8b80eacfa7cdf Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 24 Jan 2014 14:43:46 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1288 :    Migrate I18n and logging support to i18n framework and SLF4J

---
 opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java b/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
index 2b0da9f..9f1ecb1 100644
--- a/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opendj3-server-dev/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
@@ -65,7 +65,7 @@
 import org.opends.messages.CoreMessages;
 import org.opends.messages.JebMessages;
 import org.opends.messages.ReplicationMessages;
-import org.opends.messages.Message;
+import org.forgerock.i18n.LocalizableMessage;
 import static org.opends.messages.QuickSetupMessages.*;
 
 import org.opends.server.tools.ConfigureDS;
@@ -166,7 +166,7 @@
         public void processLine(String line)
         {
           LOG.log(Level.WARNING, "import-ldif error log: "+line);
-          application.notifyListeners(Message.raw(line));
+          application.notifyListeners(LocalizableMessage.raw(line));
           application.notifyListeners(application.getLineBreak());
         }
       };
@@ -178,7 +178,7 @@
         public void processLine(String line)
         {
           LOG.log(Level.INFO, "import-ldif out log: "+line);
-          application.notifyListeners(Message.raw(line));
+          application.notifyListeners(LocalizableMessage.raw(line));
           application.notifyListeners(application.getLineBreak());
         }
       };
@@ -209,12 +209,12 @@
   }
 
   /**
-   * Returns the Message ID that corresponds to a successfully started server.
-   * @return the Message ID that corresponds to a successfully started server.
+   * Returns the LocalizableMessage ID that corresponds to a successfully started server.
+   * @return the LocalizableMessage ID that corresponds to a successfully started server.
    */
   public String getStartedId()
   {
-    return String.valueOf(CoreMessages.NOTE_DIRECTORY_SERVER_STARTED.getId());
+    return String.valueOf(CoreMessages.NOTE_DIRECTORY_SERVER_STARTED.ordinal());
   }
 
   /**
@@ -224,7 +224,7 @@
   public void enableWindowsService() throws ApplicationException {
     int code = ConfigureWindowsService.enableService(System.out, System.err);
 
-    Message errorMessage = INFO_ERROR_ENABLING_WINDOWS_SERVICE.get();
+    LocalizableMessage errorMessage = INFO_ERROR_ENABLING_WINDOWS_SERVICE.get();
 
     switch (code) {
       case
@@ -271,7 +271,7 @@
       ldifFile.deleteOnExit();
     } catch (IOException ioe)
     {
-      Message failedMsg =
+      LocalizableMessage failedMsg =
               getThrowableMsg(INFO_ERROR_CREATING_TEMP_FILE.get(), ioe);
       throw new ApplicationException(
           ReturnCode.FILE_SYSTEM_ACCESS_ERROR,
@@ -330,7 +330,7 @@
     }
     catch (Throwable t)
     {
-      Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
+      LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
               serverDisplay, t.toString());
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR, errorMessage,
@@ -397,7 +397,7 @@
     }
     catch (Throwable t)
     {
-      Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
+      LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
               serverDisplay, t.toString());
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR, errorMessage,
@@ -436,7 +436,7 @@
     }
     catch (Throwable t)
     {
-      Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
+      LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
               serverDisplay, t.toString());
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR, errorMessage,
@@ -652,7 +652,7 @@
     }
     catch (Throwable t)
     {
-      Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
+      LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
               serverDisplay, t.toString());
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR, errorMessage,
@@ -765,7 +765,7 @@
     }
     catch (Throwable t)
     {
-      Message errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
+      LocalizableMessage errorMessage = INFO_ERROR_CONFIGURING_REMOTE_GENERIC.get(
               serverDisplay, t.toString());
       throw new ApplicationException(
           ReturnCode.CONFIGURATION_ERROR, errorMessage,
@@ -834,7 +834,7 @@
   public boolean isPeersNotFoundError(String logMsg)
   {
     return logMsg.contains("=" + ReplicationMessages.
-        ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.getId());
+        ERR_NO_REACHABLE_PEER_IN_THE_DOMAIN.ordinal());
   }
 
   /**
@@ -1216,9 +1216,9 @@
     if (msg != null)
     {
       if ((msg.contains("msgID=" + JebMessages
-              .NOTE_JEB_IMPORT_FINAL_STATUS.getId())) ||
+              .NOTE_JEB_IMPORT_FINAL_STATUS.ordinal())) ||
           (msg.contains("msgID=" + JebMessages
-              .NOTE_JEB_IMPORT_PROGRESS_REPORT.getId())))
+              .NOTE_JEB_IMPORT_PROGRESS_REPORT.ordinal())))
       {
         int index = msg.indexOf("msg=");
         if (index != -1)

--
Gitblit v1.10.0