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... args)
Retrieve a localized message by its key as specified by an enum.
|
String |
getMessage(MessageParameterObj mpo)
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 typekey
- an enum instanceargs
- optional argumentsMessageConveyorException
String getMessage(MessageParameterObj mpo) throws MessageConveyorException
MessageParameterObj
.
Equivalent to calling
getMessage(mpo.getKey(), mpo.getArgs());
mpo
- The MessageParameterObj to translateMessageConveyorException
getMessage(Enum, Object...)
Copyright © 2009-2016 QOS.ch. All Rights Reserved.