nl.openedge.baritus.util
Class MessageUtils

java.lang.Object
  extended bynl.openedge.baritus.util.MessageUtils

public final class MessageUtils
extends java.lang.Object

Utility class for handling localized messages.

Author:
Eelco Hillenius

Constructor Summary
MessageUtils()
           
 
Method Summary
static java.lang.String getLocalizedMessage(java.lang.String key)
          Get localized message for given key.
static java.lang.String getLocalizedMessage(java.lang.String key, java.util.Locale locale)
          Get localized message for given key and locale.
static java.lang.String getLocalizedMessage(java.lang.String key, java.util.Locale locale, java.lang.Object[] parameters)
          Get localized message for given key and locale and format it with the given parameters.
static java.lang.String getLocalizedMessage(java.lang.String key, java.lang.Object[] parameters)
          Get localized message for given key and locale and format it with the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageUtils

public MessageUtils()
Method Detail

getLocalizedMessage

public static java.lang.String getLocalizedMessage(java.lang.String key)
Get localized message for given key.

Parameters:
key - key of message
Returns:
String localized message

getLocalizedMessage

public static java.lang.String getLocalizedMessage(java.lang.String key,
                                                   java.util.Locale locale)
Get localized message for given key and locale. If locale is null, the default locale will be used.

Parameters:
key - key of message
locale - locale for message
Returns:
String localized message

getLocalizedMessage

public static java.lang.String getLocalizedMessage(java.lang.String key,
                                                   java.lang.Object[] parameters)
Get localized message for given key and locale and format it with the given parameters. If locale is null, the default locale will be used.

Parameters:
key - key of message
parameters - parameters for the message
Returns:
String localized message

getLocalizedMessage

public static java.lang.String getLocalizedMessage(java.lang.String key,
                                                   java.util.Locale locale,
                                                   java.lang.Object[] parameters)
Get localized message for given key and locale and format it with the given parameters. If locale is null, the default locale will be used.

Parameters:
key - key of message
locale - locale for message
parameters - parameters for the message
Returns:
String localized message


Copyright © 2003-2004 Open Edge. All Rights Reserved.