org.thymeleaf.messageresolver
Interface IMessageResolver

All Known Implementing Classes:
AbstractMessageResolver, StandardMessageResolver

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.

Since:
1.0
Author:
Daniel Fernández

Method Summary
 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.
 

Method Detail

getName

String getName()

Returns the name of the message resolver.

Returns:
the name of the message resolver

getOrder

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.

Returns:
the order of this resolver in the chain.

resolveMessage

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.

Parameters:
arguments - the Arguments object being used for template processing
key - the message key
messageParameters - the (optional) message parameters
Returns:
a MessageResolution object containing the resolved message.

initialize

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 © 2012 The THYMELEAF team. All Rights Reserved.