public class MessageConveyor extends Object implements IMessageConveyor
IMessageConveyor based on resource
bundles.
See also getMessage(Enum, Object...) for details.
| Constructor and Description |
|---|
MessageConveyor(Locale locale)
The
Locale associated with this instance. |
| Modifier and Type | Method and Description |
|---|---|
<E extends Enum<?>> |
getMessage(E key,
Object... args)
Given an enum as key, find the corresponding resource bundle and return
the corresponding internationalized.
|
String |
getMessage(MessageParameterObj mpo)
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
The name of the resource bundle is defined via the BaseName
annotation whereas the locale is specified in this MessageConveyor
instance's constructor.
getMessage in interface IMessageConveyorE - an enum typekey - an enum instance used as message keyargs - optional argumentsMessageConveyorExceptionpublic String getMessage(MessageParameterObj mpo) throws MessageConveyorException
IMessageConveyorMessageParameterObj.
Equivalent to calling
getMessage(mpo.getKey(), mpo.getArgs());
getMessage in interface IMessageConveyormpo - The MessageParameterObj to translateMessageConveyorExceptionIMessageConveyor.getMessage(Enum, Object...)Copyright © 2009-2013 QOS.ch. All Rights Reserved.