public interface IMessageConveyor
The strategy in retrieving messages may vary from implementation to implementation.
| Modifier and Type | Method and Description |
|---|---|
<E extends Enum |
getMessage(E key, Object
Retrieve a localized message by its key as specified by an enum.
|
String |
getMessage(MessageParameterObj
Syntactic sugar for the case where the massage is contained in a
MessageParameterObj.
|
<E extends Enum<?>> String getMessage(E key, Object ... args) throws MessageConveyorException
Note that any further arguments passed in 'args' will be interpolated using the translated message. The interpolation will be done by and according to conventions of MessageFormat.
E - an enum type
key - an enum instance
args - optional arguments
MessageConveyorException
StringgetMessage(MessageParameterObj mpo) throws MessageConveyorException
MessageParameterObj.
Equivalent to calling
getMessage(mpo.getKey(), mpo.getArgs());
mpo - The MessageParameterObj to translate
MessageConveyorException
getMessage(Enum, Object...)