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:
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd any configured processor model extensions to the model.protected SearchPathGets the search path.protected freemarker.cache.TemplateLoaderGets the loader.voidinit()Inits the processorprotected voidInitializes 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, setTemplateProcessorRegistryMethods inherited from class org.springframework.extensions.webscripts.processor.BaseProcessor
registerProcessorExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.springframework.extensions.surf.core.processor.Processor
getExtension, getNameMethods inherited from interface org.springframework.extensions.webscripts.TemplateProcessor
getDefaultEncoding, hasTemplate, process, processString, reset
-
Constructor Details
-
AbstractTemplateProcessor
public AbstractTemplateProcessor()
-
-
Method Details
-
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
- Parameters:
searchPath- SearchPath
-
getTemplateLoader
protected freemarker.cache.TemplateLoader getTemplateLoader()Gets the loader.- Returns:
- the loader
-
getSearchPath
Gets the search path.- Returns:
- the search path
-
initLoaders
protected void initLoaders()Initializes the template loaders -
addProcessorModelExtensions
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
-