|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.thymeleaf.templateresolver.TemplateResolution
public final class TemplateResolution
Result of the execution of a Template Resolver.
A TemplateResolution object is created by implementations of ITemplateResolver
when templates are resolved, and it contains:
IResourceResolver
)
to be used for trying to read this template.
The fact that a Template Resolver returns a TemplateResolution
does not necessarily
mean that the template will be effectively be resolved by the Template Resolver. For this,
the Resource Resolver will also need to be able to resolve the declared template's resource.
Constructor Summary | |
---|---|
TemplateResolution(String templateName,
String resourceName,
IResourceResolver resourceResolver,
String characterEncoding,
String templateMode,
ITemplateResolutionValidity validity)
|
Method Summary | |
---|---|
String |
getCharacterEncoding()
Returns the character encoding that should be used for reading the template (using the Resource Resolver). |
String |
getResourceName()
Returns the resource name. |
IResourceResolver |
getResourceResolver()
Returns the resource resolver that should be used for actually reading the template (using the provided resource name, see getResourceName() ). |
String |
getTemplateMode()
Returns the template mode to be applied. |
String |
getTemplateName()
Returns the template name. |
ITemplateResolutionValidity |
getValidity()
Returns the template resolution validity. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateResolution(String templateName, String resourceName, IResourceResolver resourceResolver, String characterEncoding, String templateMode, ITemplateResolutionValidity validity)
Method Detail |
---|
public String getTemplateName()
Returns the template name.
This should be the same name used for calling the
TemplateEngine.process(String, org.thymeleaf.context.IContext)
method.
public String getResourceName()
Returns the resource name.
The resource name is the identifier that will be used for actually reading
the template by means of the Resource Resolver (see getResourceResolver()
).
This resource name will typically be computed by the Template Resolver from the template
name. For example, a Template Resolver could have a prefix and a suffix configured
so that starting from the template name "home" it returns the resource name
"/WEB-INF/templates/web/home.html", which can be then read by a
ClassLoaderResourceResolver
instance.
public IResourceResolver getResourceResolver()
Returns the resource resolver that should be used for actually reading the template
(using the provided resource name, see getResourceName()
).
public String getCharacterEncoding()
Returns the character encoding that should be used for reading the template (using the Resource Resolver).
public String getTemplateMode()
Returns the template mode to be applied. This template mode should be
resolvable to a configured Template Mode Handler
(ITemplateModeHandler
).
public ITemplateResolutionValidity getValidity()
Returns the template resolution validity.
This validity establishes whether the template can be included in the template cache, and also for how long its resolution will be considered valid.
When a cached template is not considered valid, its cache entry is discarded and it is resolved again.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |