Class ClassPathRepoTemplateLoader

  • All Implemented Interfaces:
    freemarker.cache.TemplateLoader

    public class ClassPathRepoTemplateLoader
    extends Object
    implements freemarker.cache.TemplateLoader
    Custom FreeMarker template loader to locate templates stored either from the ClassPath or in a Alfresco Repository.

    The template name should be supplied either as a NodeRef String or a ClassPath path String.

    Author:
    Kevin Roast
    • Method Detail

      • findTemplateSource

        public Object findTemplateSource​(String name)
                                  throws IOException
        Return an object wrapping a source for a template
        Specified by:
        findTemplateSource in interface freemarker.cache.TemplateLoader
        Throws:
        IOException
      • getLastModified

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

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