Package com.aspectran.pebble
Class PebbleTemplateEngine
java.lang.Object
com.aspectran.pebble.PebbleTemplateEngine
- All Implemented Interfaces:
TemplateEngine
The Class PebbleTemplateEngine.
Created: 2016. 1. 9.
-
Constructor Summary
Constructors -
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
.
-
Constructor Details
-
PebbleTemplateEngine
public PebbleTemplateEngine(io.pebbletemplates.pebble.PebbleEngine pebbleEngine)
-
-
Method Details
-
process
public void process(String templateName, Map<String, Object> model, String templateSource, Writer writer) throws TemplateEngineProcessExceptionDescription copied from interface:TemplateEngine
Executes template, using the data-model provided, writing the generated output to the suppliedWriter
.- Specified by:
process
in interfaceTemplateEngine
- 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
public void process(String templateName, Map<String, Object> model, Writer writer) throws TemplateEngineProcessExceptionDescription copied from interface:TemplateEngine
Executes template, using the data-model provided, writing the generated output to the suppliedWriter
.- Specified by:
process
in interfaceTemplateEngine
- 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
public void process(String templateName, Map<String, Object> model, Writer writer, Locale locale) throws TemplateEngineProcessExceptionDescription copied from interface:TemplateEngine
Executes template, using the data-model provided, writing the generated output to the suppliedWriter
.- Specified by:
process
in interfaceTemplateEngine
- 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
-