From 80c58327faaa4873369f6bb949e62792c2f708e0 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.
---
opends/src/server/org/opends/server/core/WorkQueueConfigManager.java | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/WorkQueueConfigManager.java b/opends/src/server/org/opends/server/core/WorkQueueConfigManager.java
index 7ebde1f..0bcd2ec 100644
--- a/opends/src/server/org/opends/server/core/WorkQueueConfigManager.java
+++ b/opends/src/server/org/opends/server/core/WorkQueueConfigManager.java
@@ -25,6 +25,7 @@
* Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
+import org.opends.messages.Message;
@@ -44,8 +45,8 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.messages.ConfigMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
+import static org.opends.messages.ConfigMessages.*;
+
import static org.opends.server.util.StaticUtils.*;
@@ -118,11 +119,11 @@
}
catch (Exception e)
{
- int msgID = MSGID_CONFIG_WORK_QUEUE_INITIALIZATION_FAILED;
- String message = getMessage(msgID, workQueueConfig.getWorkQueueClass(),
- String.valueOf(workQueueConfig.dn()),
- stackTraceToSingleLineString(e));
- throw new InitializationException(msgID, message, e);
+ Message message = ERR_CONFIG_WORK_QUEUE_INITIALIZATION_FAILED.
+ get(workQueueConfig.getWorkQueueClass(),
+ String.valueOf(workQueueConfig.dn()),
+ stackTraceToSingleLineString(e));
+ throw new InitializationException(message, e);
}
}
@@ -132,7 +133,7 @@
* {@inheritDoc}
*/
public boolean isConfigurationChangeAcceptable(WorkQueueCfg configuration,
- List<String> unacceptableReasons)
+ List<Message> unacceptableReasons)
{
// Changes to the work queue configuration will always be acceptable to this
// generic implementation.
@@ -148,7 +149,7 @@
{
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
- ArrayList<String> messages = new ArrayList<String>();
+ ArrayList<Message> messages = new ArrayList<Message>();
// If the work queue class has been changed, then we should warn the user
@@ -157,9 +158,10 @@
String workQueueClass = configuration.getWorkQueueClass();
if (! workQueueClass.equals(workQueue.getClass().getName()))
{
- int msgID = MSGID_CONFIG_WORK_QUEUE_CLASS_CHANGE_REQUIRES_RESTART;
- messages.add(getMessage(msgID, workQueue.getClass().getName(),
- workQueueClass));
+
+ messages.add(INFO_CONFIG_WORK_QUEUE_CLASS_CHANGE_REQUIRES_RESTART.get(
+ workQueue.getClass().getName(),
+ workQueueClass));
adminActionRequired = true;
}
--
Gitblit v1.10.0