Input - Skill input type.public abstract class AbstractLocalTemplateFileLoader<Input> extends Object implements TemplateLoader<Input>
TemplateLoader abstract implementation to load template file from local file system, build and return TemplateContentData.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractLocalTemplateFileLoader.Builder<Input,Self extends AbstractLocalTemplateFileLoader.Builder<Input,Self>>
Abstract Local Template File Loader Builder.
|
| Modifier and Type | Field and Description |
|---|---|
protected ClassLoader |
classLoader
Loads classes.
|
protected String |
directoryPath
Templates' directory path.
|
protected String |
fileExtension
Type of templates is determined by this file extension.
|
protected TemplateCache |
templateCache
Caches the template content.
|
protected BiFunction<String,Input,TemplateEnumerator<Input>> |
templateEnumeratorSupplier
Template enumerator supplier.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLocalTemplateFileLoader(String directoryPath,
String fileExtension,
ClassLoader classLoader,
TemplateCache templateCache,
BiFunction<String,Input,TemplateEnumerator<Input>> templateEnumeratorSupplier)
Constructor for AbstractLocalTemplateFileLoader.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<TemplateContentData> |
load(String responseTemplateName,
Input input)
Given template name, load template content from data store.
|
protected final String directoryPath
protected final String fileExtension
protected final ClassLoader classLoader
protected final TemplateCache templateCache
protected final BiFunction<String,Input,TemplateEnumerator<Input>> templateEnumeratorSupplier
protected AbstractLocalTemplateFileLoader(String directoryPath, String fileExtension, ClassLoader classLoader, TemplateCache templateCache, BiFunction<String,Input,TemplateEnumerator<Input>> templateEnumeratorSupplier)
directoryPath - Templates' directory path.fileExtension - Type of templates is determined by this file extension.classLoader - Loads classes.templateCache - Caches the template content.templateEnumeratorSupplier - Template enumerator supplier.public Optional<TemplateContentData> load(String responseTemplateName, Input input) throws TemplateLoaderException
TemplateEnumerator and TemplateCache.load in interface TemplateLoader<Input>responseTemplateName - template nameinput - skill inputTemplateContentData contains template contentTemplateLoaderException - if fail to load templateCopyright © 2023. All rights reserved.