Class 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
    • 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 - 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:
        onApplicationEvent in interface org.springframework.context.ApplicationListener
        Overrides:
        onApplicationEvent in class BaseRegisterableTemplateProcessor