public class FTLTemplateProcessor extends AbstractTemplateProcessor
| Modifier and Type | Class and Description |
|---|---|
static class |
FTLTemplateProcessor.NonBlockingObjectWrapper
Implements the FreeMarker ObjectWrapper cache as a ThreadLocal to avoid blocking
when interogating or populating the bean cache.
|
processorExtensions| Constructor and Description |
|---|
FTLTemplateProcessor() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultEncoding()
Gets the default encoding
|
String |
getExtension()
The file extension that the processor is associated with, null if none.
|
String |
getName()
Get the name of the processor
|
boolean |
hasTemplate(String templatePath)
Determines if a template exists
|
void |
init()
Inits the processor
|
protected void |
initConfig()
Initialise FreeMarker Configuration
|
protected boolean |
isDebugMode() |
void |
process(String template,
Object model,
Writer out)
Process a template against the supplied data model and write to the out.
|
void |
processString(String template,
Object model,
Writer out)
Process a string template against the supplied data model and write to the out.
|
void |
reset()
Reset the Template Processor
|
void |
setCacheSize(int cacheSize) |
void |
setConfigService(ConfigService configService)
Sets the config service.
|
void |
setDefaultEncoding(String defaultEncoding) |
void |
setUpdateDelay(int updateDelay) |
addProcessorModelExtensions, getSearchPath, getTemplateLoader, initLoaders, onApplicationEvent, register, setApplicationContext, setSearchPathgetTemplateProcessorRegistry, setTemplateProcessorRegistryregisterProcessorExtensionpublic void setConfigService(ConfigService configService)
configService - The ConfigServicepublic void setDefaultEncoding(String defaultEncoding)
defaultEncoding - Stringpublic String getDefaultEncoding()
TemplateProcessorpublic void setUpdateDelay(int updateDelay)
updateDelay - the time in seconds between checks on the modified date for cached templatespublic void setCacheSize(int cacheSize)
cacheSize - the size of the MRU template cache, default is 256public void init()
BaseRegisterableTemplateProcessorinit in class AbstractTemplateProcessorpublic String getExtension()
Processorpublic String getName()
Processorpublic void process(String template, Object model, Writer out)
TemplateProcessortemplate - Template name/pathmodel - Object model to process template againstout - Writer object to send output toopublic void processString(String template, Object model, Writer out)
TemplateProcessortemplate - Template stringmodel - Object model to process template againstout - Writer object to send output toopublic void reset()
TemplateProcessorpublic boolean hasTemplate(String templatePath)
TemplateProcessortemplatePath - Stringprotected void initConfig()
protected boolean isDebugMode()
Copyright © 2005–2016 Alfresco Software. All rights reserved.