public class FilesystemTemplateProvider extends Object implements TemplateProvider
TemplateProvider implementation that looks for template files in the
filesystem, either at a hardcoded location or a location that is taken from
the template context parameter to
getTemplate(TemplateContext, String).| Modifier and Type | Field and Description |
|---|---|
static String |
SOURCE_PATH_OPTION
Name of template context option for the source path.
|
TEMPLATE_CONTEXT_PROVIDER| Constructor and Description |
|---|
FilesystemTemplateProvider(String sourcePath)
Creates a new filesystem template provider that looks for template files
at the given source path.
|
| Modifier and Type | Method and Description |
|---|---|
Template |
getTemplate(TemplateContext templateContext,
String templateName)
Retrieves the template with the given name.
|
public static final String SOURCE_PATH_OPTION
public FilesystemTemplateProvider(String sourcePath)
sourcePath - The source path of the template filespublic Template getTemplate(TemplateContext templateContext, String templateName)
getTemplate in interface TemplateProvidertemplateContext - The template contexttemplateName - The name of the templatenull if there is no
template with the requested nameCopyright © 2026. All rights reserved.