Interface TemplateProcessor
-
- All Known Implementing Classes:
AbstractTemplateProcessor,FTLTemplateProcessor
public interface TemplateProcessorWeb Script Template Processor- Author:
- davidc
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDefaultEncoding()Gets the default encodingbooleanhasTemplate(java.lang.String template)Determines if a template existsvoidprocess(java.lang.String template, java.lang.Object model, java.io.Writer out)Process a template against the supplied data model and write to the out.voidprocessString(java.lang.String template, java.lang.Object model, java.io.Writer out)Process a string template against the supplied data model and write to the out.voidreset()Reset the Template Processor
-
-
-
Method Detail
-
hasTemplate
boolean hasTemplate(java.lang.String template)
Determines if a template exists- Parameters:
template- String- Returns:
- true => exists
-
process
void process(java.lang.String template, java.lang.Object model, java.io.Writer out)Process a template against the supplied data model and write to the out.- Parameters:
template- Template name/pathmodel- Object model to process template againstout- Writer object to send output too
-
processString
void processString(java.lang.String template, java.lang.Object model, java.io.Writer out)Process a string template against the supplied data model and write to the out.- Parameters:
template- Template stringmodel- Object model to process template againstout- Writer object to send output too
-
getDefaultEncoding
java.lang.String getDefaultEncoding()
Gets the default encoding- Returns:
- default encoding
-
reset
void reset()
Reset the Template Processor
-
-