From cfc513043c5830b5a967733066068c7097b42e3c Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.

---
 opendj-sdk/opends/src/server/org/opends/server/api/ErrorLogPublisher.java |   30 +++++++++++++-----------------
 1 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/api/ErrorLogPublisher.java b/opendj-sdk/opends/src/server/org/opends/server/api/ErrorLogPublisher.java
index c03a398..45bca6a 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/api/ErrorLogPublisher.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/api/ErrorLogPublisher.java
@@ -25,6 +25,7 @@
  *      Portions Copyright 2007 Sun Microsystems, Inc.
  */
 package org.opends.server.api;
+import org.opends.messages.Message;
 
 
 
@@ -34,10 +35,12 @@
 
 import org.opends.server.admin.std.server.ErrorLogPublisherCfg;
 import org.opends.server.config.ConfigException;
-import org.opends.server.types.ErrorLogCategory;
-import org.opends.server.types.ErrorLogSeverity;
+
+
 import org.opends.server.types.InitializationException;
 import org.opends.server.types.DN;
+import org.opends.messages.Severity;
+import org.opends.messages.Category;
 
 
 /**
@@ -54,9 +57,9 @@
    * The hash map that will be used to define specific log severities
    * for the various categories.
    */
-  protected HashMap<ErrorLogCategory,HashSet<ErrorLogSeverity>>
+  protected HashMap<Category,HashSet<Severity>>
       definedSeverities =
-           new HashMap<ErrorLogCategory, HashSet<ErrorLogSeverity>>();
+           new HashMap<Category, HashSet<Severity>>();
 
 
 
@@ -64,8 +67,8 @@
    * The set of default log severities that will be used if no custom
    * severities have been defined for the associated category.
    */
-  protected HashSet<ErrorLogSeverity>
-       defaultSeverities = new HashSet<ErrorLogSeverity>();
+  protected HashSet<Severity>
+       defaultSeverities = new HashSet<Severity>();
 
 
 
@@ -115,7 +118,7 @@
    */
   public boolean isConfigurationAcceptable(
                       ErrorLogPublisherCfg configuration,
-                      List<String> unacceptableReasons)
+                      List<Message> unacceptableReasons)
   {
     // This default implementation does not perform any special
     // validation.  It should be overridden by error log publisher
@@ -134,19 +137,12 @@
 
   /**
    * Writes a message to the error log using the provided information.
+   * The message's category and severity information will be used to
+   * determine whether to actually log this message.
    *
-   * @param  category  The category that may be used to determine
-   *                   whether to actually log this message.
-   * @param  severity  The severity that may be used to determine
-   *                   whether to actually log this message.
    * @param  message   The message to be logged.
-   * @param  errorID   The error ID that uniquely identifies the
-   *                   format string used to generate the provided
-   *                   message.
    */
-  public abstract void logError(ErrorLogCategory category,
-                                ErrorLogSeverity severity,
-                                String message, int errorID);
+  public abstract void logError(Message message);
 
   /**
    * Gets the DN of the configuration entry for this error log

--
Gitblit v1.10.0