Class RepositoryTemplateProcessor

All Implemented Interfaces:
EventListener, org.alfresco.processor.Processor, TemplateProcessor, TemplateValueConverter, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, org.springframework.extensions.webscripts.TemplateProcessor

public class RepositoryTemplateProcessor extends FreeMarkerProcessor implements org.springframework.extensions.webscripts.TemplateProcessor, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener
Repository (server-tier) Web Script Template Processor
Author:
davidc
  • Field Details

    • searchPath

      protected org.springframework.extensions.webscripts.SearchPath searchPath
    • defaultEncoding

      protected String defaultEncoding
    • templateConfig

      protected freemarker.template.Configuration templateConfig
    • freeMarkerProcessor

      protected FreeMarkerProcessor freeMarkerProcessor
  • Constructor Details

    • RepositoryTemplateProcessor

      public RepositoryTemplateProcessor()
  • Method Details

    • setDefaultEncoding

      public void setDefaultEncoding(String defaultEncoding)
      Overrides:
      setDefaultEncoding in class FreeMarkerProcessor
    • getDefaultEncoding

      public String getDefaultEncoding()
      Specified by:
      getDefaultEncoding in interface org.springframework.extensions.webscripts.TemplateProcessor
    • setUpdateDelay

      public void setUpdateDelay(int updateDelay)
      Parameters:
      updateDelay - the time in seconds between checks on the modified date for cached templates
    • setCacheSize

      @Deprecated public void setCacheSize(int cacheSize)
      Deprecated.
      Parameters:
      cacheSize - not used anymore
    • setSearchPath

      public void setSearchPath(org.springframework.extensions.webscripts.SearchPath searchPath)
      Parameters:
      searchPath - SearchPath
    • setFreeMarkerProcessor

      public void setFreeMarkerProcessor(FreeMarkerProcessor freeMarkerProcessor)
      Set the freemarker processor
      Parameters:
      freeMarkerProcessor - the free marker processor
    • getConfig

      protected freemarker.template.Configuration getConfig()
      Overrides:
      getConfig in class FreeMarkerProcessor
    • reset

      public void reset()
      Specified by:
      reset in interface org.springframework.extensions.webscripts.TemplateProcessor
    • hasTemplate

      public boolean hasTemplate(String templatePath)
      Specified by:
      hasTemplate in interface org.springframework.extensions.webscripts.TemplateProcessor
    • initConfig

      protected void initConfig()
      Initialise FreeMarker Configuration
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • onApplicationEvent

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