public interface IMessageResolver
Common interface for all objects used for the resolution of externalized (internationalized) messages.
A Template Engine can be set several message resolvers, which will be asked for
resolution of externalized messages in the order established by the getOrder()
method.
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of the message resolver.
|
Integer |
getOrder()
Return the order in which this message resolver will be executed in the
chain when several message resolvers are set for the same Template Engine.
|
void |
initialize()
Initialize the Message Resolver.
|
MessageResolution |
resolveMessage(Arguments arguments,
String key,
Object[] messageParameters)
Resolve the message, returning a
MessageResolution object. |
String getName()
Returns the name of the message resolver.
Integer getOrder()
Return the order in which this message resolver will be executed in the chain when several message resolvers are set for the same Template Engine.
MessageResolution resolveMessage(Arguments arguments, String key, Object[] messageParameters)
Resolve the message, returning a MessageResolution
object.
If the message cannot be resolved, this method should return null.
arguments
- the Arguments
object being used for template processingkey
- the message keymessageParameters
- the (optional) message parametersMessageResolution
object containing the resolved message.void initialize()
Initialize the Message Resolver. Once initialized, none of its configuration parameters should be allowed to change.
This method is called by TemplateEngine. Do not use directly in your code.
Copyright © 2017 The THYMELEAF team. All rights reserved.