@ApplicationScoped public class FreemarkerTemplateProcessor extends BaseTemplateProcessor<freemarker.template.Template>
TemplateProcessor for the freemarker templating engine.TemplateProcessor.Qualifier, TemplateProcessor.Registry, TemplateProcessor.Selector| Constructor and Description |
|---|
FreemarkerTemplateProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected freemarker.template.Template |
createTemplateImplementation(Template template,
String source)
To be implemented by the subclass.
|
String |
getTemplateLanguage() |
protected String |
processTemplate(freemarker.template.Template templateImplementation,
Map<String,Object> data)
Run a template implementation for specific data set.
|
void |
validate(Template template)
Validates if a certain template object is valid.
|
clearCache, createSetFreeMarkerTemplateInCache, createTemplateSource, getTemplateImplementation, process, readTemplateSourceFromClasspathpublic static final String QUALIFIER
protected String processTemplate(freemarker.template.Template templateImplementation, Map<String,Object> data)
BaseTemplateProcessorprocessTemplate in class BaseTemplateProcessor<freemarker.template.Template>templateImplementation - the template to processdata - the data which should be passed to the templateprotected freemarker.template.Template createTemplateImplementation(Template template, String source)
BaseTemplateProcessorcreateTemplateImplementation in class BaseTemplateProcessor<freemarker.template.Template>template - the template object from the DBsource - the complete source (after resolving and including all dependencies)public void validate(Template template) throws ValidationException
TemplateProcessorValidationException is thrown.template - the template to validateValidationExceptionpublic String getTemplateLanguage()