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/server/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java b/opendj3-server-dev/src/server/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java
index 16925a7..840a776 100644
--- a/opendj3-server-dev/src/server/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java
+++ b/opendj3-server-dev/src/server/org/opends/server/admin/ManagedObjectDefinitionI18NResource.java
@@ -22,10 +22,11 @@
*
*
* Copyright 2008 Sun Microsystems, Inc.
+ * Portions Copyright 2014 ForgeRock AS
*/
package org.opends.server.admin;
-import org.opends.messages.Message;
+import org.forgerock.i18n.LocalizableMessage;
@@ -133,7 +134,7 @@
* If the provided managed object definition was the
* {@link TopCfgDefn}.
*/
- public Message getMessage(AbstractManagedObjectDefinition<?, ?> d, String key)
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d, String key)
throws MissingResourceException, UnsupportedOperationException {
return getMessage(d, key, Locale.getDefault(), (String[]) null);
}
@@ -158,7 +159,7 @@
* If the provided managed object definition was the
* {@link TopCfgDefn}.
*/
- public Message getMessage(AbstractManagedObjectDefinition<?, ?> d,
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d,
String key, Locale locale) throws MissingResourceException,
UnsupportedOperationException {
return getMessage(d, key, locale, (String[]) null);
@@ -187,17 +188,17 @@
* If the provided managed object definition was the
* {@link TopCfgDefn}.
*/
- public Message getMessage(AbstractManagedObjectDefinition<?, ?> d,
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d,
String key, Locale locale, String... args)
throws MissingResourceException, UnsupportedOperationException {
ResourceBundle resource = getResourceBundle(d, locale);
// TODO: use message framework directly
if (args == null) {
- return Message.raw(resource.getString(key));
+ return LocalizableMessage.raw(resource.getString(key));
} else {
MessageFormat mf = new MessageFormat(resource.getString(key));
- return Message.raw(mf.format(args));
+ return LocalizableMessage.raw(mf.format(args));
}
}
@@ -222,7 +223,7 @@
* If the provided managed object definition was the
* {@link TopCfgDefn}.
*/
- public Message getMessage(AbstractManagedObjectDefinition<?, ?> d,
+ public LocalizableMessage getMessage(AbstractManagedObjectDefinition<?, ?> d,
String key, String... args) throws MissingResourceException,
UnsupportedOperationException {
return getMessage(d, key, Locale.getDefault(), args);
--
Gitblit v1.10.0