public class TemplateEngineDefault extends Object implements TemplateEngine
| Modifier and Type | Field and Description |
|---|---|
static TemplateInterpreter |
interpreter |
DEFAULT_BEAN_NAME| Constructor and Description |
|---|
TemplateEngineDefault() |
public static final TemplateInterpreter interpreter
public boolean isLocaleTemplateEnable()
TemplateEngineisLocaleTemplateEnable in interface TemplateEnginepublic void setLocaleTemplateEnable(boolean localeTemplateEnable)
TemplateEnginesetLocaleTemplateEnable in interface TemplateEnginepublic boolean isCheckModified()
isCheckModified in interface TemplateEnginepublic void setCheckModified(boolean checkModified)
TemplateEnginesetCheckModified in interface TemplateEnginepublic boolean isSafeVariable()
isSafeVariable in interface TemplateEnginepublic void setSafeVariable(boolean safeVariable)
setSafeVariable in interface TemplateEnginepublic TemplateInterpreter getTemplateInterpreter()
public boolean isCompactMode()
TemplateEngineisCompactMode in interface TemplateEnginepublic void setCompactMode(boolean compactMode)
TemplateEnginesetCompactMode in interface TemplateEnginepublic boolean isThrowLexerError()
public void setThrowLexerError(boolean throwLexerError)
public void registerMacroLibrary(String path) throws TemplateException
TemplateEngineregisterMacroLibrary in interface TemplateEngineTemplateExceptionpublic void registerMacro(Macro macro) throws TemplateException
TemplateEngineregisterMacro in interface TemplateEngineTemplateExceptionpublic void registerMacroLibrary(Template template) throws TemplateException
TemplateEngineregisterMacroLibrary in interface TemplateEngineTemplateExceptionpublic void write(OutputStream outputStream, Object data) throws TemplateException
write in interface TemplateEngineTemplateExceptionpublic TemplateContext getTemplateContext()
TemplateContextOperatorgetTemplateContext in interface TemplateContextOperatorpublic I18nVisitor getI18nVisitor()
TemplateEnginegetI18nVisitor in interface TemplateEnginepublic TemplateEngineDefault setI18nVisitor(I18nVisitor i18nVistor)
TemplateEnginesetI18nVisitor in interface TemplateEnginepublic TemplateEngineDefault addTemplateFunction(TemplateFunction function)
TemplateEngineaddTemplateFunction in interface TemplateEnginepublic TemplateFunction getTemplateFunction(String methodName)
TemplateEnginegetTemplateFunction in interface TemplateEnginemethodName - 注册的方法名public TemplateFunction getTemplateFunction(Object object, String methodName)
TemplateEnginegetTemplateFunction in interface TemplateEnginemethodName - 注册的方法名public String getEncode()
TemplateEnginegetEncode in interface TemplateEnginepublic TemplateEngineDefault setEncode(String encode)
TemplateEnginesetEncode in interface TemplateEnginepublic TemplateEngineDefault addResourceLoader(ResourceLoader resourceLoader)
TemplateEngineaddResourceLoader in interface TemplateEnginepublic Template findTemplate(String path) throws TemplateException
TemplateEnginefindTemplate in interface TemplateEngineTemplateExceptionpublic void removeTemplate(String path) throws TemplateException
removeTemplate in interface TemplateEngineTemplateExceptionpublic Template findLayout(String path) throws TemplateException
TemplateExceptionpublic TemplateEngineDefault put(String key, Object value)
TemplateContextOperatorput in interface TemplateContextOperatorpublic void renderMacro(String macroName, Template Template, TemplateContext context, OutputStream outputStream) throws TemplateException
TemplateEnginerenderMacro in interface TemplateEnginemacroName - 要执行的宏名称Template - 调用宏的模板context - 上下文outputStream - 输出器TemplateExceptionpublic void renderMacro(Macro macro, Template Template, TemplateContext context, OutputStream outputStream) throws TemplateException
TemplateEnginerenderMacro in interface TemplateEnginemacro - 要执行的宏Template - 调用宏的模板context - 上下文outputStream - 输出器TemplateExceptionpublic void renderTemplate(String path, TemplateContext context, OutputStream outputStream) throws TemplateException
TemplateEnginerenderTemplate in interface TemplateEnginepath - 模板对应的路径context - 上下文outputStream - 输出器TemplateExceptionpublic void renderTemplateWithOutLayout(String path, TemplateContext context, OutputStream outputStream) throws TemplateException
TemplateEnginerenderTemplateWithOutLayout in interface TemplateEngineTemplateExceptionpublic void renderTemplate(String path) throws TemplateException
TemplateEnginerenderTemplate in interface TemplateEngineTemplateExceptionpublic void renderTemplate(Template Template) throws TemplateException
TemplateEnginerenderTemplate in interface TemplateEngineTemplateExceptionpublic void renderTemplate(Template template, TemplateContext context, OutputStream outputStream) throws TemplateException
TemplateEnginerenderTemplate in interface TemplateEnginetemplate - 要渲染的模板context - 上下文outputStream - 输出器TemplateExceptionpublic Macro findMacro(Object macroNameObject, Template template, TemplateContext context) throws TemplateException
TemplateEnginefindMacro in interface TemplateEngineTemplateExceptionpublic Object executeFunction(Template Template, TemplateContext context, String functionName, Object... parameters) throws TemplateException
TemplateEngineexecuteFunction in interface TemplateEngineTemplateExceptionpublic List<ResourceLoader> getResourceLoaderList()
TemplateEnginegetResourceLoaderList in interface TemplateEnginepublic void setResourceLoaderList(List<ResourceLoader> resourceLoaderList)
TemplateEnginesetResourceLoaderList in interface TemplateEnginepublic String getResourceContent(String path, String encode) throws TemplateException
TemplateEnginegetResourceContent in interface TemplateEngineTemplateExceptionpublic String getResourceContent(String path) throws TemplateException
TemplateEnginegetResourceContent in interface TemplateEngineTemplateExceptionpublic void registerStaticClassOperator(StaticClassOperator operator) throws TemplateException
TemplateEngineregisterStaticClassOperator in interface TemplateEngineTemplateExceptionpublic StaticClassOperator getStaticClassOperator(String name) throws TemplateException
TemplateEnginegetStaticClassOperator in interface TemplateEngineTemplateExceptionpublic Template findTemplateCache(String path)
TemplateEnginefindTemplateCache in interface TemplateEnginepublic Template findTemplateCache(String path, String absolutePath)
TemplateEnginefindTemplateCache in interface TemplateEnginepublic void addTemplateCache(String path, Template template)
TemplateEngineaddTemplateCache in interface TemplateEnginepublic void removeTemplateCache(String path, String absolutePath)
TemplateEngineremoveTemplateCache in interface TemplateEnginepublic Macro findMacroCache(String macroName)
TemplateEnginefindMacroCache in interface TemplateEnginepublic void addMacroCache(String macroName, Macro macro)
TemplateEngineaddMacroCache in interface TemplateEnginepublic void removeMacroCache(String macroName, String absolutePath)
TemplateEngineremoveMacroCache in interface TemplateEngineCopyright © 2006–2018 TinyGroup. All rights reserved.