Class AbstractTemplateProcessor
- java.lang.Object
-
- org.springframework.extensions.webscripts.processor.BaseProcessor
-
- org.springframework.extensions.webscripts.processor.BaseRegisterableTemplateProcessor
-
- org.springframework.extensions.webscripts.processor.AbstractTemplateProcessor
-
- All Implemented Interfaces:
java.util.EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener,Processor,TemplateProcessor
- Direct Known Subclasses:
FTLTemplateProcessor
public abstract class AbstractTemplateProcessor extends BaseRegisterableTemplateProcessor implements org.springframework.context.ApplicationContextAware, TemplateProcessor
Abstract class for use in helping developers to build template processors that take advantage of the web script framework's inherent support for search paths.- Author:
- muzquiano
-
-
Field Summary
-
Fields inherited from class org.springframework.extensions.webscripts.processor.BaseProcessor
processorExtensions
-
-
Constructor Summary
Constructors Constructor Description AbstractTemplateProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddProcessorModelExtensions(java.lang.Object model)Add any configured processor model extensions to the model.protected SearchPathgetSearchPath()Gets the search path.protected freemarker.cache.TemplateLoadergetTemplateLoader()Gets the loader.voidinit()Inits the processorprotected voidinitLoaders()Initializes the template loadersvoidonApplicationEvent(org.springframework.context.ApplicationEvent event)voidregister()Registers this processor with the parent processorvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)Sets the application context.voidsetSearchPath(SearchPath searchPath)-
Methods inherited from class org.springframework.extensions.webscripts.processor.BaseRegisterableTemplateProcessor
getTemplateProcessorRegistry, setTemplateProcessorRegistry
-
Methods inherited from class org.springframework.extensions.webscripts.processor.BaseProcessor
registerProcessorExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.extensions.surf.core.processor.Processor
getExtension, getName
-
Methods inherited from interface org.springframework.extensions.webscripts.TemplateProcessor
getDefaultEncoding, hasTemplate, process, processString, reset
-
-
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Sets the application context.- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Overrides:
setApplicationContextin classBaseRegisterableTemplateProcessor- Parameters:
applicationContext- the new application context
-
setSearchPath
public void setSearchPath(SearchPath searchPath)
- Parameters:
searchPath- SearchPath
-
getTemplateLoader
protected freemarker.cache.TemplateLoader getTemplateLoader()
Gets the loader.- Returns:
- the loader
-
getSearchPath
protected SearchPath getSearchPath()
Gets the search path.- Returns:
- the search path
-
initLoaders
protected void initLoaders()
Initializes the template loaders
-
addProcessorModelExtensions
protected void addProcessorModelExtensions(java.lang.Object model)
Add any configured processor model extensions to the model.- Parameters:
model- Object
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener- Overrides:
onApplicationEventin classBaseRegisterableTemplateProcessor
-
init
public void init()
Description copied from class:BaseRegisterableTemplateProcessorInits the processor- Specified by:
initin classBaseRegisterableTemplateProcessor
-
register
public void register()
Description copied from class:BaseRegisterableTemplateProcessorRegisters this processor with the parent processor- Specified by:
registerin classBaseRegisterableTemplateProcessor
-
-