public class JDSFreemarkerResult extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected freemarker.template.Configuration |
configuration |
protected JDSFreemarkerManager |
freemarkerManager |
protected String |
location |
protected freemarker.template.ObjectWrapper |
wrapper |
| 构造器和说明 |
|---|
JDSFreemarkerResult() |
JDSFreemarkerResult(String location) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected freemarker.template.TemplateModel |
createModel() |
Writer |
doExecute(String location,
String templatePath) |
void |
doExecute(String location,
Writer writer,
String templatePath) |
protected freemarker.template.Configuration |
getConfiguration(String templatePath) |
String |
getContentType() |
protected freemarker.template.ObjectWrapper |
getObjectWrapper() |
Writer |
getWriter()
The default writer writes directly to the response writer.
|
protected void |
postTemplateProcess(freemarker.template.Template template,
freemarker.template.TemplateModel data)
the default implementation of postTemplateProcess applies the contentType parameter
|
protected boolean |
preTemplateProcess(freemarker.template.Template template,
freemarker.template.TemplateModel model) |
void |
setContentType(String aContentType) |
void |
setFreemarkerManager(JDSFreemarkerManager mgr) |
void |
setWriter(Writer writer) |
protected freemarker.template.Configuration configuration
protected freemarker.template.ObjectWrapper wrapper
protected JDSFreemarkerManager freemarkerManager
protected String location
public JDSFreemarkerResult()
public JDSFreemarkerResult(String location)
public void setFreemarkerManager(JDSFreemarkerManager mgr)
public void setContentType(String aContentType)
public String getContentType()
public Writer doExecute(String location, String templatePath) throws IOException, freemarker.template.TemplateException
IOExceptionfreemarker.template.TemplateExceptionpublic void doExecute(String location, Writer writer, String templatePath) throws IOException, freemarker.template.TemplateException
IOExceptionfreemarker.template.TemplateExceptionprotected freemarker.template.Configuration getConfiguration(String templatePath) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionprotected freemarker.template.ObjectWrapper getObjectWrapper()
public void setWriter(Writer writer)
public Writer getWriter() throws IOException
IOExceptionprotected freemarker.template.TemplateModel createModel()
throws freemarker.template.TemplateModelException
freemarker.template.TemplateModelExceptionprotected void postTemplateProcess(freemarker.template.Template template,
freemarker.template.TemplateModel data)
throws IOException
IOExceptionprotected boolean preTemplateProcess(freemarker.template.Template template,
freemarker.template.TemplateModel model)
throws IOException
IOExceptionCopyright © 2023 onecode. All rights reserved.