public class LocaleMessageHandler extends Object
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
Modifier and Type | Field and Description |
---|---|
protected static Log |
logger
logger used by this class
|
Constructor and Description |
---|
LocaleMessageHandler() |
Modifier and Type | Method and Description |
---|---|
static String |
getString(String bundleName,
Locale locale,
String code,
Object[] args)
Get the resource string for the given bundle name, locale, resource code and array
of arguments.
|
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
|
protected static final Log logger
public static String getString(String bundleName, String code)
public static String getString(String bundleName, String code, Object arg1)
public static String getString(String bundleName, String code, Object arg1, Object arg2)
public static String getString(String bundleName, String code, Object[] args)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.