LocaleMessageHandler (Mule ESB 2.2.1 API)
Keywords: org.mule.config.i18n.LocaleMessageHandler class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Constructor Summary
`LocaleMessageHandler()`

Method Summary
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    protected static final Log logger

  logger used by this class

Constructor Detail

### LocaleMessageHandler

    public LocaleMessageHandler()

Method Detail

### 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.

### getString

    public 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. All above methods invoke this one.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.