public class MessageConveyor extends Objectimplements IMessageConveyor
IMessageConveyor based on resource bundles.
See also
getMessage(Enum, Object...) for details.
| Constructor and Description |
|---|
MessageConveyor(Locale
The
Locale associated with this instance.
|
| Modifier and Type | Method and Description |
|---|---|
<E extends Enum |
getMessage(E key, Object
Given an enum as key, find the resource bundle corresponding to this locale and return the message corresponding to the key passed as parameter (internationalized per this locale).
|
String |
getMessage(MessageParameterObj
Syntactic sugar for the case where the massage is contained in a
MessageParameterObj.
|
public <E extends Enum<?>> String getMessage(E key, Object ... args) throws MessageConveyorException
BaseName annotation whereas the locale is specified in this MessageConveyor instance's constructor.
getMessage in interface
IMessageConveyor
E - an enum type
key - an enum instance used as message key
args - optional arguments
MessageConveyorException
public StringgetMessage(MessageParameterObj mpo) throws MessageConveyorException
IMessageConveyor
MessageParameterObj.
Equivalent to calling
getMessage(mpo.getKey(), mpo.getArgs());
getMessage in interface
IMessageConveyor
mpo - The MessageParameterObj to translate
MessageConveyorException
IMessageConveyor.getMessage(Enum, Object...)