org.thymeleaf.templateresolver
Class UrlTemplateResolver

Object
  extended by org.thymeleaf.templateresolver.AbstractTemplateResolver
      extended by org.thymeleaf.templateresolver.TemplateResolver
          extended by org.thymeleaf.templateresolver.UrlTemplateResolver
All Implemented Interfaces:
ITemplateResolver

public class UrlTemplateResolver
extends TemplateResolver

Implementation of ITemplateResolver that extends TemplateResolver and uses a UrlResourceResolver for resource resolution.

Since:
1.0
Author:
Daniel Fernández

Field Summary
 
Fields inherited from class org.thymeleaf.templateresolver.TemplateResolver
DEFAULT_CACHE_TTL_MS, DEFAULT_CACHEABLE, DEFAULT_TEMPLATE_MODE
 
Constructor Summary
UrlTemplateResolver()
           
 
Method Summary
protected  ITemplateResolutionValidity computeValidity(TemplateProcessingParameters templateProcessingParameters)
           Computes the validity to be applied to the template resolution.
 void setResourceResolver(IResourceResolver resourceResolver)
           This method should not be called, because the resource resolver is fixed to be UrlResourceResolver.
 
Methods inherited from class org.thymeleaf.templateresolver.TemplateResolver
addTemplateAlias, clearTemplateAliases, computeCharacterEncoding, computeResourceName, computeResourceResolver, computeTemplateMode, getCacheablePatterns, getCacheablePatternSpec, getCacheTTLMs, getCharacterEncoding, getHtml5TemplateModePatterns, getHtml5TemplateModePatternSpec, getLegacyHtml5TemplateModePatterns, getLegacyHtml5TemplateModePatternSpec, getNonCacheablePatterns, getNonCacheablePatternSpec, getPrefix, getResourceResolver, getSuffix, getTemplateAliases, getTemplateMode, getValidXhtmlTemplateModePatterns, getValidXhtmlTemplateModePatternSpec, getValidXmlTemplateModePatterns, getValidXmlTemplateModePatternSpec, getXhtmlTemplateModePatterns, getXhtmlTemplateModePatternSpec, getXmlTemplateModePatterns, getXmlTemplateModePatternSpec, initializeSpecific, initializeSpecificAdditional, isCacheable, setCacheable, setCacheablePatterns, setCacheTTLMs, setCharacterEncoding, setHtml5TemplateModePatterns, setLegacyHtml5TemplateModePatterns, setNonCacheablePatterns, setPrefix, setSuffix, setTemplateAliases, setTemplateMode, setTemplateMode, setValidXhtmlTemplateModePatterns, setValidXmlTemplateModePatterns, setXhtmlTemplateModePatterns, setXmlTemplateModePatterns, unsafeGetCacheTTLMs, unsafeGetCharacterEncoding, unsafeGetPrefix, unsafeGetResourceResolver, unsafeGetSuffix, unsafeGetTemplateMode, unsafeIsCacheable
 
Methods inherited from class org.thymeleaf.templateresolver.AbstractTemplateResolver
checkInitialized, checkNotInitialized, computeResolvable, getName, getOrder, getResolvablePatterns, getResolvablePatternSpec, initialize, isInitialized, resolveTemplate, setName, setOrder, setResolvablePatterns, unsafeGetName, unsafeGetOrder
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlTemplateResolver

public UrlTemplateResolver()
Method Detail

setResourceResolver

public void setResourceResolver(IResourceResolver resourceResolver)

This method should not be called, because the resource resolver is fixed to be UrlResourceResolver. Every execution of this method will result in an exception.

If you need to select a different resource resolver, use the TemplateResolver class instead.

Overrides:
setResourceResolver in class TemplateResolver
Parameters:
resourceResolver - the new resource resolver

computeValidity

protected ITemplateResolutionValidity computeValidity(TemplateProcessingParameters templateProcessingParameters)
Description copied from class: AbstractTemplateResolver

Computes the validity to be applied to the template resolution. This includes determining whether the template can be cached or not, and also in what circumstances (for instance, for how much time) can its cache entry be considered valid.

Overrides:
computeValidity in class TemplateResolver
Parameters:
templateProcessingParameters - the template processing parameters
Returns:
the validity


Copyright © 2012 The THYMELEAF team. All Rights Reserved.