public class DocumentGeneraterImpl extends Object implements DocumentGenerater<TemplateEngine>
开发人员: renhui
开发时间: 2013-7-25
DOCUMENT_GENERATE_BEAN_NAME
Constructor and Description |
---|
DocumentGeneraterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addMacroFile(FileObject fileObject)
增加宏文件模板
|
String |
evaluteString(Context context,
String inputString)
转化输入的字符串
|
void |
generate(FileObject fileObject,
Context context,
OutputStream writer)
根据tinyTemplate模板文件生成文件
|
void |
generate(String path,
Context context,
File outputFile)
根据tinyTemplate模板文件生成文件
|
void |
generate(String path,
Context context,
OutputStream writer)
根据tinyTemplate模板文件生成文件
|
FileResourceManager |
getFileResourceManager() |
TemplateEngine |
getTemplateGenerater()
获得模板引擎执行器
|
void |
removeMacroFile(FileObject fileObject)
移除宏文件模板
|
void |
setFileResourceManager(FileResourceManager fileResourceManager) |
void |
setTemplateGenerater(TemplateEngine generater)
设置模板引擎执行器
|
public TemplateEngine getTemplateGenerater()
DocumentGenerater
getTemplateGenerater
in interface DocumentGenerater<TemplateEngine>
public void setTemplateGenerater(TemplateEngine generater)
DocumentGenerater
setTemplateGenerater
in interface DocumentGenerater<TemplateEngine>
public FileResourceManager getFileResourceManager()
public void setFileResourceManager(FileResourceManager fileResourceManager)
public void generate(FileObject fileObject, Context context, OutputStream writer)
DocumentGenerater
generate
in interface DocumentGenerater<TemplateEngine>
fileObject
- tinyTemplate模板文件context
- 默认文件需要用到的上下文环境writer
- 输出的流public void generate(String path, Context context, OutputStream writer)
DocumentGenerater
generate
in interface DocumentGenerater<TemplateEngine>
path
- tinyTemplate模板文件context
- 默认文件需要用到的上下文环境writer
- 输出的流public void addMacroFile(FileObject fileObject)
DocumentGenerater
addMacroFile
in interface DocumentGenerater<TemplateEngine>
fileObject
- 宏模板文件public void removeMacroFile(FileObject fileObject)
DocumentGenerater
removeMacroFile
in interface DocumentGenerater<TemplateEngine>
fileObject
- 宏模板文件public void generate(String path, Context context, File outputFile)
DocumentGenerater
generate
in interface DocumentGenerater<TemplateEngine>
path
- tinyTemplate模板文件context
- 默认文件需要用到的上下文环境outputFile
- 输出文件public String evaluteString(Context context, String inputString)
DocumentGenerater
evaluteString
in interface DocumentGenerater<TemplateEngine>
Copyright © 2006–2018 TinyGroup. All rights reserved.