TemplateEngine
public class FreeMarkerTemplateEngine extends java.lang.Object implements TemplateEngine
Created: 2016. 1. 9.
Constructor | Description |
---|---|
FreeMarkerTemplateEngine(freemarker.template.Configuration configuration) |
Modifier and Type | Method | Description |
---|---|---|
void |
process(java.lang.String templateName,
java.util.Map<java.lang.String,java.lang.Object> model,
java.io.Writer writer) |
Executes template, using the data-model provided, writing the generated output to the supplied
Writer . |
void |
process(java.lang.String templateName,
java.util.Map<java.lang.String,java.lang.Object> model,
java.io.Writer writer,
java.util.Locale locale) |
Executes template, using the data-model provided, writing the generated output to the supplied
Writer . |
void |
process(java.lang.String templateName,
java.util.Map<java.lang.String,java.lang.Object> model,
java.lang.String templateSource,
java.io.Writer writer) |
Executes template, using the data-model provided, writing the generated output to the supplied
Writer . |
public FreeMarkerTemplateEngine(freemarker.template.Configuration configuration)
public void process(java.lang.String templateName, java.util.Map<java.lang.String,java.lang.Object> model, java.lang.String templateSource, java.io.Writer writer) throws TemplateEngineProcessException
TemplateEngine
Writer
.process
in interface TemplateEngine
templateName
- the template namemodel
- the holder of the variables visible from the template (name-value pairs)templateSource
- the template sourcewriter
- the Writer
where the output of the template will go. Writer.close()
is not called.TemplateEngineProcessException
- if an exception occurs during template processingpublic void process(java.lang.String templateName, java.util.Map<java.lang.String,java.lang.Object> model, java.io.Writer writer) throws TemplateEngineProcessException
TemplateEngine
Writer
.process
in interface TemplateEngine
templateName
- the template namemodel
- the holder of the variables visible from the template (name-value pairs)writer
- the Writer
where the output of the template will go. Writer.close()
is not called.TemplateEngineProcessException
- if an exception occurs during template processingpublic void process(java.lang.String templateName, java.util.Map<java.lang.String,java.lang.Object> model, java.io.Writer writer, java.util.Locale locale) throws TemplateEngineProcessException
TemplateEngine
Writer
.process
in interface TemplateEngine
templateName
- the template namemodel
- the holder of the variables visible from the template (name-value pairs)writer
- the Writer
where the output of the template will go. Writer.close()
is not called.locale
- the localeTemplateEngineProcessException
- if an exception occurs during template processingCopyright © 2008–2018 The Aspectran Project. All rights reserved.