org.apache.struts2.views.freemarker

## 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 Summary

    Constructors
    Constructor and Description
    `FreemarkerThemeTemplateLoader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeTemplateSource(Object templateSource)`
    `Object` | `findTemplateSource(String name)`
    `long` | `getLastModified(Object templateSource)`
    `freemarker.cache.TemplateLoader` | `getParentTemplateLoader()`
    `Reader` | `getReader(Object templateSource, String encoding)`
    `void` | `init(freemarker.cache.TemplateLoader parent)` Initialize the loader for the given parent.
    `void` | `setTemplateEngine(TemplateEngine templateEngine)`
    `void` | `setUIThemeExpansionToken(String token)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FreemarkerThemeTemplateLoader

          public FreemarkerThemeTemplateLoader()

  - ### Method Detail

    - #### 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()

Copyright © 2000–2021 Apache Software Foundation. All rights reserved.