public class UrlTemplateResolver extends AbstractConfigurableTemplateResolver
Implementation of ITemplateResolver
that extends AbstractConfigurableTemplateResolver
and creates UrlTemplateResource
instances for template resources.
Note a class with this name existed since 1.0, but it was completely rewritten in Thymeleaf 3.0.
DEFAULT_CACHE_TTL_MS, DEFAULT_CACHEABLE, DEFAULT_TEMPLATE_MODE
DEFAULT_EXISTENCE_CHECK, DEFAULT_USE_DECOUPLED_LOGIC
Constructor and Description |
---|
UrlTemplateResolver() |
Modifier and Type | Method and Description |
---|---|
protected ITemplateResource |
computeTemplateResource(IEngineConfiguration configuration,
String ownerTemplate,
String template,
String resourceName,
String characterEncoding,
Map<String,Object> templateResolutionAttributes)
Compute the real resource, once the resource name has been computed using prefix, suffix, and other
configured artifacts.
|
protected ICacheEntryValidity |
computeValidity(IEngineConfiguration configuration,
String ownerTemplate,
String template,
Map<String,Object> templateResolutionAttributes)
Computes the validity to be applied to the template resolution.
|
addTemplateAlias, clearTemplateAliases, computeResourceName, computeTemplateMode, computeTemplateResource, getCacheablePatterns, getCacheablePatternSpec, getCacheTTLMs, getCharacterEncoding, getCSSTemplateModePatterns, getCSSTemplateModePatternSpec, getHtml5TemplateModePatterns, getHtml5TemplateModePatternSpec, getHtmlTemplateModePatterns, getHtmlTemplateModePatternSpec, getJavaScriptTemplateModePatterns, getJavaScriptTemplateModePatternSpec, getLegacyHtml5TemplateModePatterns, getLegacyHtml5TemplateModePatternSpec, getNonCacheablePatterns, getNonCacheablePatternSpec, getPrefix, getRawTemplateModePatterns, getRawTemplateModePatternSpec, getSuffix, getTemplateAliases, getTemplateMode, getTextTemplateModePatterns, getTextTemplateModePatternSpec, getValidXhtmlTemplateModePatterns, getValidXhtmlTemplateModePatternSpec, getValidXmlTemplateModePatterns, getValidXmlTemplateModePatternSpec, getXhtmlTemplateModePatterns, getXhtmlTemplateModePatternSpec, getXmlTemplateModePatterns, getXmlTemplateModePatternSpec, isCacheable, setCacheable, setCacheablePatterns, setCacheTTLMs, setCharacterEncoding, setCSSTemplateModePatterns, setHtml5TemplateModePatterns, setHtmlTemplateModePatterns, setJavaScriptTemplateModePatterns, setLegacyHtml5TemplateModePatterns, setNonCacheablePatterns, setPrefix, setRawTemplateModePatterns, setSuffix, setTemplateAliases, setTemplateMode, setTemplateMode, setTextTemplateModePatterns, setValidXhtmlTemplateModePatterns, setValidXmlTemplateModePatterns, setXhtmlTemplateModePatterns, setXmlTemplateModePatterns
computeResolvable, getCheckExistence, getName, getOrder, getResolvablePatterns, getResolvablePatternSpec, getUseDecoupledLogic, resolveTemplate, setCheckExistence, setName, setOrder, setResolvablePatterns, setUseDecoupledLogic
protected ITemplateResource computeTemplateResource(IEngineConfiguration configuration, String ownerTemplate, String template, String resourceName, String characterEncoding, Map<String,Object> templateResolutionAttributes)
AbstractConfigurableTemplateResolver
Compute the real resource, once the resource name has been computed using prefix, suffix, and other configured artifacts.
computeTemplateResource
in class AbstractConfigurableTemplateResolver
configuration
- the engine configuration in use.ownerTemplate
- the owner template, if the resource being computed is a fragment. Might be null.template
- the template (normally the template name, except for String templates).resourceName
- the resource name, complete with prefix, suffix, aliases, etc.characterEncoding
- the character encoding to be used for reading the resource.templateResolutionAttributes
- the template resolution attributes, if any. Might be null.protected ICacheEntryValidity computeValidity(IEngineConfiguration configuration, String ownerTemplate, String template, Map<String,Object> templateResolutionAttributes)
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.
computeValidity
in class AbstractConfigurableTemplateResolver
configuration
- the engine configuration.ownerTemplate
- the owner template, if the resource being computed is a fragment. Might be null.template
- the template to be resolved (usually its name).templateResolutionAttributes
- the template resolution attributes, if any. Might be null.Copyright © 2016 The THYMELEAF team. All rights reserved.