public abstract class ResourceLoaderBase extends Object implements ITemplateResourceLoader
Implement common logic of an ITemplateResourceLoader
| Constructor and Description |
|---|
ResourceLoaderBase() |
| Modifier and Type | Method and Description |
|---|---|
protected RythmEngine |
getDefaultEngine() |
RythmEngine |
getEngine() |
String |
getFullName(TemplateClass tc) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResourceLoaderRoot, loadprotected static ILogger logger
public RythmEngine getEngine()
getEngine in interface ITemplateResourceLoaderpublic void setEngine(RythmEngine engine)
setEngine in interface ITemplateResourceLoaderpublic String getFullName(TemplateClass tc)
protected RythmEngine getDefaultEngine()
public TemplateClass tryLoadTemplate(String tmplName, RythmEngine engine, TemplateClass callerClass, ICodeType codeType)
ITemplateResourceLoaderTry to load a template tag with tag name.
tryLoadTemplate in interface ITemplateResourceLoadercodeType - public void scan(TemplateResourceManager manager)
ITemplateResourceLoaderScan 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
scan in interface ITemplateResourceLoadermanager - the resource managerCopyright © 2017–2021 OSGL (Open Source General Library). All rights reserved.