Class FreemarkerThemeTemplateLoader

java.lang.Object
org.apache.struts2.views.freemarker.FreemarkerThemeTemplateLoader
All Implemented Interfaces:
freemarker.cache.TemplateLoader

public class FreemarkerThemeTemplateLoader extends Object implements freemarker.cache.TemplateLoader
When loading a template, if sees theme token in path, does a template search through theme hierarchy for template, starting at the theme name after the token.
  • Constructor Details

    • FreemarkerThemeTemplateLoader

      public FreemarkerThemeTemplateLoader()
  • Method Details

    • init

      public void init(freemarker.cache.TemplateLoader parent)
      Initialize the loader for the given parent.
      Parameters:
      parent - the parent template loader
    • findTemplateSource

      public Object findTemplateSource(String name) throws IOException
      Specified by:
      findTemplateSource in interface freemarker.cache.TemplateLoader
      Throws:
      IOException
    • getLastModified

      public long getLastModified(Object templateSource)
      Specified by:
      getLastModified in interface freemarker.cache.TemplateLoader
    • getReader

      public Reader getReader(Object templateSource, String encoding) throws IOException
      Specified by:
      getReader in interface freemarker.cache.TemplateLoader
      Throws:
      IOException
    • closeTemplateSource

      public void closeTemplateSource(Object templateSource) throws IOException
      Specified by:
      closeTemplateSource in interface freemarker.cache.TemplateLoader
      Throws:
      IOException
    • setUIThemeExpansionToken

      public void setUIThemeExpansionToken(String token)
    • setTemplateEngine

      public void setTemplateEngine(TemplateEngine templateEngine)
    • getParentTemplateLoader

      public freemarker.cache.TemplateLoader getParentTemplateLoader()