public interface PebbleTemplate
PebbleEngine.
A template by itself is stateless and can therefore be re-used over and over to provide different
outputs depending on the variables that are provided at the time of evaluation.| Modifier and Type | Method and Description |
|---|---|
void |
evaluate(Writer writer)
Evaluate the template without any provided variables.
|
void |
evaluate(Writer writer,
Locale locale)
Evaluate the template with a particular locale but without any provided variables.
|
void |
evaluate(Writer writer,
Map<String,Object> context)
Evaluate the template with a set of variables and the default locale provided by the
PebbleEngine |
void |
evaluate(Writer writer,
Map<String,Object> context,
Locale locale)
Evaluate the template with a particular locale and a set of variables.
|
void |
evaluateBlock(String blockName,
Writer writer)
Evaluate the template but only render the contents of a specific block.
|
void |
evaluateBlock(String blockName,
Writer writer,
Locale locale)
Evaluate the template but only render the contents of a specific block.
|
void |
evaluateBlock(String blockName,
Writer writer,
Map<String,Object> context)
Evaluate the template but only render the contents of a specific block.
|
void |
evaluateBlock(String blockName,
Writer writer,
Map<String,Object> context,
Locale locale)
Evaluate the template but only render the contents of a specific block.
|
String |
getName()
Returns the name of the template
|
void evaluate(Writer writer) throws IOException
PebbleEngine.writer - The results of the evaluation are written to this writer.IOException - An IO exception during the evaluationvoid evaluate(Writer writer, Locale locale) throws IOException
writer - The results of the evaluation are written to this writer.locale - The locale used during the evaluation of the template.IOException - An IO exception during the evaluationvoid evaluate(Writer writer, Map<String,Object> context) throws IOException
PebbleEnginewriter - The results of the evaluation are written to this writer.context - The variables used during the evaluation of the template.IOException - An IO exception during the evaluationvoid evaluate(Writer writer, Map<String,Object> context, Locale locale) throws IOException
writer - The results of the evaluation are written to this writer.context - The variables used during the evaluation of the template.locale - The locale used during the evaluation of the template.IOException - An IO exception during the evaluationvoid evaluateBlock(String blockName, Writer writer) throws IOException
blockName - The name of the template block to return.writer - The results of the evaluation are written to this writer.IOException - An IO exception during the evaluationvoid evaluateBlock(String blockName, Writer writer, Locale locale) throws IOException
blockName - The name of the template block to return.writer - The results of the evaluation are written to this writer.locale - The locale used during the evaluation of the template.IOException - An IO exception during the evaluationvoid evaluateBlock(String blockName, Writer writer, Map<String,Object> context) throws IOException
blockName - The name of the template block to return.writer - The results of the evaluation are written to this writer.context - The variables used during the evaluation of the template.IOException - An IO exception during the evaluationvoid evaluateBlock(String blockName, Writer writer, Map<String,Object> context, Locale locale) throws IOException
blockName - The name of the template block to return.writer - The results of the evaluation are written to this writer.context - The variables used during the evaluation of the template.locale - The locale used during the evaluation of the template.IOException - An IO exception during the evaluationString getName()
Copyright © 2020. All rights reserved.