org.mule.config.i18n
Class LocaleMessageHandler
java.lang.Object
org.mule.config.i18n.LocaleMessageHandler
public class LocaleMessageHandler
- extends Object
The LocaleMessageHandler
is essentially a merging of the Message
and Messages classes, since there is no good reason to have them separate. A
key point is that this Handler is meant to be used for application-specific
messages, rather than core system messages. (That's not to say it couldn't
eventually replace the latter, however). Note that message codes are Strings
here, instead of the ints in Message.
The LocaleMessageHandler can be called directly, but is really meant to be
called by LocaleMessage classes as done in the examples.
Note that this class assumes the resource bundle is in the format
-messages and is located at the top of the jar or classes
directory. We can later add the ability to specify a path prefix.
Field Summary |
protected static Log |
logger
logger used by this class |
Method Summary |
static String |
getString(String bundleName,
String code)
Get the resource string for the given bundle name and resource code |
static String |
getString(String bundleName,
String code,
Object arg1)
Get the resource string for the given bundle name, resource code and
one argument |
static String |
getString(String bundleName,
String code,
Object[] args)
Get the resource string for the given bundle name, resource code and array
of arguments. |
static String |
getString(String bundleName,
String code,
Object arg1,
Object arg2)
Get the resource string for the given bundle name, resource code and
two arguments |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Log logger
- logger used by this class
LocaleMessageHandler
public LocaleMessageHandler()
getString
public static String getString(String bundleName,
String code)
- Get the resource string for the given bundle name and resource code
getString
public static String getString(String bundleName,
String code,
Object arg1)
- Get the resource string for the given bundle name, resource code and
one argument
getString
public static String getString(String bundleName,
String code,
Object arg1,
Object arg2)
- Get the resource string for the given bundle name, resource code and
two arguments
getString
public static String getString(String bundleName,
String code,
Object[] args)
- Get the resource string for the given bundle name, resource code and array
of arguments. All above methods invoke this one.
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.