org.springframework.extensions.webscripts.processor
Class AbstractTemplateProcessor

java.lang.Object
  extended by org.springframework.extensions.webscripts.processor.BaseProcessor
      extended by org.springframework.extensions.webscripts.processor.BaseRegisterableTemplateProcessor
          extended by org.springframework.extensions.webscripts.processor.AbstractTemplateProcessor
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, Processor, TemplateProcessor
Direct Known Subclasses:
FTLTemplateProcessor, GroovyTemplateProcessor, PHPTemplateProcessor

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
AbstractTemplateProcessor()
           
 
Method Summary
protected  void addProcessorModelExtensions(Object model)
          Add any configured processor model extensions to the model.
protected  SearchPath getSearchPath()
          Gets the search path.
protected  freemarker.cache.TemplateLoader getTemplateLoader()
          Gets the loader.
 void init()
          Inits the processor
protected  void initLoaders()
          Initializes the template loaders
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void register()
          Registers this processor with the parent processor
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
          Sets the application context.
 void setSearchPath(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.webscripts.TemplateProcessor
getDefaultEncoding, hasTemplate, process, processString, reset
 
Methods inherited from interface org.springframework.extensions.surf.core.processor.Processor
getExtension, getName
 

Constructor Detail

AbstractTemplateProcessor

public AbstractTemplateProcessor()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Sets the application context.

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Overrides:
setApplicationContext in class BaseRegisterableTemplateProcessor
Parameters:
applicationContext - the new application context

setSearchPath

public void setSearchPath(SearchPath searchPath)
Parameters:
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(Object model)
Add any configured processor model extensions to the model.

Parameters:
model -

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener
Overrides:
onApplicationEvent in class BaseRegisterableTemplateProcessor

init

public void init()
Description copied from class: BaseRegisterableTemplateProcessor
Inits the processor

Specified by:
init in class BaseRegisterableTemplateProcessor

register

public void register()
Description copied from class: BaseRegisterableTemplateProcessor
Registers this processor with the parent processor

Specified by:
register in class BaseRegisterableTemplateProcessor


Copyright © 2009 SpringSource, Inc. All Rights Reserved.