org.thymeleaf.spring4.messageresolver
Class SpringNonCacheableMessageResolver

Object
  extended by org.thymeleaf.messageresolver.AbstractMessageResolver
      extended by org.thymeleaf.spring4.messageresolver.SpringNonCacheableMessageResolver
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware, org.thymeleaf.messageresolver.IMessageResolver

public final class SpringNonCacheableMessageResolver
extends org.thymeleaf.messageresolver.AbstractMessageResolver
implements org.springframework.context.MessageSourceAware

Implementation of IMessageResolver that integrates the standard Spring way of resolving messages into Thymeleaf.

This resolution is done by means of using the available Spring-configured MessageSource objects.

This message resolver will consider you are using a reloadable MessageSource in your Spring configuration and thus will be considered non-cacheable.

Since:
1.0
Author:
Daniel Fernández

Constructor Summary
SpringNonCacheableMessageResolver()
           
 
Method Summary
 org.springframework.context.MessageSource getMessageSource()
           Returns the message source (MessageSource) to be used for message resolution.
protected  void initializeSpecific()
           
protected  void initializeSpringSpecific()
           
 org.thymeleaf.messageresolver.MessageResolution resolveMessage(org.thymeleaf.Arguments arguments, String key, Object[] messageParameters)
           
 void setMessageSource(org.springframework.context.MessageSource messageSource)
           Sets the message source to be used for message resolution
protected  org.springframework.context.MessageSource unsafeGetMessageSource()
           Uninitialized method meant for use by subclasses.
 
Methods inherited from class org.thymeleaf.messageresolver.AbstractMessageResolver
checkInitialized, checkNotInitialized, getName, getOrder, initialize, isInitialized, setName, setOrder, unsafeGetName, unsafeGetOrder
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringNonCacheableMessageResolver

public SpringNonCacheableMessageResolver()
Method Detail

initializeSpecific

protected final void initializeSpecific()
Overrides:
initializeSpecific in class org.thymeleaf.messageresolver.AbstractMessageResolver

initializeSpringSpecific

protected void initializeSpringSpecific()

getMessageSource

public final org.springframework.context.MessageSource getMessageSource()

Returns the message source (MessageSource) to be used for message resolution.

Returns:
the message source

unsafeGetMessageSource

protected final org.springframework.context.MessageSource unsafeGetMessageSource()

Uninitialized method meant for use by subclasses.

Returns:
the message source

setMessageSource

public void setMessageSource(org.springframework.context.MessageSource messageSource)

Sets the message source to be used for message resolution

Specified by:
setMessageSource in interface org.springframework.context.MessageSourceAware
Parameters:
messageSource - the message source

resolveMessage

public org.thymeleaf.messageresolver.MessageResolution resolveMessage(org.thymeleaf.Arguments arguments,
                                                                      String key,
                                                                      Object[] messageParameters)
Specified by:
resolveMessage in interface org.thymeleaf.messageresolver.IMessageResolver


Copyright © 2013 The THYMELEAF team. All Rights Reserved.