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/admin/AbstractManagedObjectDefinition.java | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java b/opendj-sdk/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
index a1295cd..2c7769f 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
@@ -26,6 +26,7 @@
*/
package org.opends.server.admin;
+import org.opends.messages.Message;
@@ -269,7 +270,7 @@
* in the default locale, or <code>null</code> if there is
* no description.
*/
- public final String getDescription() {
+ public final Message getDescription() {
return getDescription(Locale.getDefault());
}
@@ -285,7 +286,7 @@
* in the specified locale, or <code>null</code> if there
* is no description.
*/
- public final String getDescription(Locale locale) {
+ public final Message getDescription(Locale locale) {
try {
return ManagedObjectDefinitionI18NResource.getInstance()
.getMessage(this, "description", locale);
@@ -419,7 +420,7 @@
* @return Returns the synopsis of this managed object definition in
* the default locale.
*/
- public final String getSynopsis() {
+ public final Message getSynopsis() {
return getSynopsis(Locale.getDefault());
}
@@ -434,7 +435,7 @@
* @return Returns the synopsis of this managed object definition in
* the specified locale.
*/
- public final String getSynopsis(Locale locale) {
+ public final Message getSynopsis(Locale locale) {
return ManagedObjectDefinitionI18NResource.getInstance()
.getMessage(this, "synopsis", locale);
}
@@ -448,7 +449,7 @@
* @return Returns the user friendly name of this managed object
* definition in the default locale.
*/
- public final String getUserFriendlyName() {
+ public final Message getUserFriendlyName() {
return getUserFriendlyName(Locale.getDefault());
}
@@ -463,9 +464,10 @@
* @return Returns the user friendly name of this managed object
* definition in the specified locale.
*/
- public final String getUserFriendlyName(Locale locale) {
- return ManagedObjectDefinitionI18NResource.getInstance()
- .getMessage(this, "user-friendly-name", locale);
+ public final Message getUserFriendlyName(Locale locale) {
+ // TODO: have admin framework getMessage return a Message
+ return Message.raw(ManagedObjectDefinitionI18NResource.getInstance()
+ .getMessage(this, "user-friendly-name", locale));
}
@@ -477,7 +479,7 @@
* @return Returns the user friendly plural name of this managed
* object definition in the default locale.
*/
- public final String getUserFriendlyPluralName() {
+ public final Message getUserFriendlyPluralName() {
return getUserFriendlyPluralName(Locale.getDefault());
}
@@ -492,7 +494,7 @@
* @return Returns the user friendly plural name of this managed
* object definition in the specified locale.
*/
- public final String getUserFriendlyPluralName(Locale locale) {
+ public final Message getUserFriendlyPluralName(Locale locale) {
return ManagedObjectDefinitionI18NResource.getInstance()
.getMessage(this, "user-friendly-plural-name", locale);
}
--
Gitblit v1.10.0