Interface TemplateEngine
- All Known Implementing Classes:
FreeMarkerTemplateEngine
,PebbleTemplateEngine
public interface TemplateEngine
The Interface TemplateEngine.
Created: 2016. 1. 9.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Executes template, using the data-model provided, writing the generated output to the suppliedWriter
.void
Executes template, using the data-model provided, writing the generated output to the suppliedWriter
.void
Executes template, using the data-model provided, writing the generated output to the suppliedWriter
.
-
Method Details
-
process
void process(String templateName, Map<String, Object> model, String templateSource, Writer writer) throws TemplateEngineProcessExceptionExecutes template, using the data-model provided, writing the generated output to the suppliedWriter
.- Parameters:
templateName
- the template namemodel
- the holder of the variables visible from the template (name-value pairs)templateSource
- the template sourcewriter
- theWriter
where the output of the template will go.Writer.close()
is not called.- Throws:
TemplateEngineProcessException
- if an exception occurs during template processing
-
process
void process(String templateName, Map<String, Object> model, Writer writer) throws TemplateEngineProcessExceptionExecutes template, using the data-model provided, writing the generated output to the suppliedWriter
.- Parameters:
templateName
- the template namemodel
- the holder of the variables visible from the template (name-value pairs)writer
- theWriter
where the output of the template will go.Writer.close()
is not called.- Throws:
TemplateEngineProcessException
- if an exception occurs during template processing
-
process
void process(String templateName, Map<String, Object> model, Writer writer, Locale locale) throws TemplateEngineProcessExceptionExecutes template, using the data-model provided, writing the generated output to the suppliedWriter
.- Parameters:
templateName
- the template namemodel
- the holder of the variables visible from the template (name-value pairs)writer
- theWriter
where the output of the template will go.Writer.close()
is not called.locale
- the locale- Throws:
TemplateEngineProcessException
- if an exception occurs during template processing
-