public interface IResourceResolver
Base interface for all objects used for the resolution of template resources (files, URLs, etc).
When a template is resolved by a Template Resolver (implementation of ITemplateResolver
),
the resulting TemplateResolution
object includes
both a Resource Resolver and a resource name. The Template Engine will then use the
resource resolver to try to resolve the template resource (e.g. read a file), and if the resource
cannot be resolved then the next Template Resolver in the chain will be asked to resolve it.
Modifier and Type | Method and Description |
---|---|
String |
getName()
The name of the resource resolver.
|
InputStream |
getResourceAsStream(TemplateProcessingParameters templateProcessingParameters,
String resourceName)
Resolve the resource, this is, open an input stream for it.
|
String getName()
The name of the resource resolver.
InputStream getResourceAsStream(TemplateProcessingParameters templateProcessingParameters, String resourceName)
Resolve the resource, this is, open an input stream for it.
If the resource cannot be resolved, this method should return null.
templateProcessingParameters
- the TemplateProcessingParameters
object being used for template processingresourceName
- the resource name to be resolved/readCopyright © 2016 The THYMELEAF team. All rights reserved.