public interface ITemplateResourceLoader
Defines the behavior of a template resource loader
| Modifier and Type | Method and Description |
|---|---|
RythmEngine |
getEngine() |
String |
getResourceLoaderRoot()
Return root path of this resource loader
|
ITemplateResource |
load(String path)
Load template resource by path
|
void |
scan(TemplateResourceManager manager)
Scan the folder and try to load all template files under the folder.
|
void |
setEngine(RythmEngine engine) |
TemplateClass |
tryLoadTemplate(String tmplName,
RythmEngine engine,
TemplateClass callerClass,
ICodeType codeType)
Try to load a template tag with tag name.
|
void setEngine(RythmEngine engine)
RythmEngine getEngine()
String getResourceLoaderRoot()
Return root path of this resource loader
ITemplateResource load(String path)
Load template resource by path
path - TemplateClass tryLoadTemplate(String tmplName, RythmEngine engine, TemplateClass callerClass, ICodeType codeType)
Try to load a template tag with tag name.
tmplName - engine - callerClass - codeType - void scan(TemplateResourceManager manager)
Scan the folder and try to load all template files under the folder. Once a resource is located, it should be passed to the resource manager by TemplateResourceManager.resourceLoaded(ITemplateResource) call
Note it is up to the loader implementation to decide the root path where to start the scan
manager - the resource managerCopyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.