public class StringResourceLoader extends AbstractResourceLoader<String>
Constructor and Description |
---|
StringResourceLoader() |
Modifier and Type | Method and Description |
---|---|
Template |
createLayout(String templateMaterial) |
Template |
createMacroLibrary(String templateMaterial) |
Template |
createTemplate(String stringTemplateMaterial)
根据字符串创建模板(不缓存)
|
String |
getResourceContent(String path,
String encode)
字符串内存型的,不支持根据路径载入
|
boolean |
isModified(String path)
确定某个路径对应的文件是否被修改
|
protected Template |
loadLayout(String path) |
protected Template |
loadMacroLibrary(String path) |
Template |
loadTemplate(String stringTemplateMaterial)
根据字符串创建并缓存模板
|
protected Template |
loadTemplateItem(String path)
字符串内存型的,不支持根据路径载入
|
void |
resetModified(String path)
清置修改状态
|
addTemplate, getClassLoader, getLayout, getLayoutExtName, getLayoutPath, getMacroLibrary, getMacroLibraryExtName, getTemplate, getTemplateEngine, getTemplateExtName, isLayout, isLoadResource, isMacroLibrary, isTemplate, setClassLoader, setLayoutExtName, setMacroLibraryExtName, setTemplateEngine, setTemplateExtName
protected Template loadTemplateItem(String path) throws TemplateException
loadTemplateItem
in class AbstractResourceLoader<String>
path
- TemplateException
protected Template loadLayout(String path) throws TemplateException
TemplateException
protected Template loadMacroLibrary(String path) throws TemplateException
TemplateException
public boolean isModified(String path)
ResourceLoader
public String getResourceContent(String path, String encode)
path
- encode
- public Template loadTemplate(String stringTemplateMaterial) throws TemplateException
stringTemplateMaterial
- TemplateException
public Template createTemplate(String stringTemplateMaterial) throws TemplateException
TemplateException
public Template createLayout(String templateMaterial) throws TemplateException
TemplateException
public Template createMacroLibrary(String templateMaterial) throws TemplateException
TemplateException
public void resetModified(String path)
ResourceLoader
Copyright © 2006–2018 TinyGroup. All rights reserved.