Package org.alfresco.repo.template
Class ClassPathRepoTemplateLoader
java.lang.Object
org.alfresco.repo.template.ClassPathRepoTemplateLoader
- All Implemented Interfaces:
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
-
Constructor Summary
ConstructorsConstructorDescriptionClassPathRepoTemplateLoader(NodeService nodeService, ContentService contentService, String encoding) -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseTemplateSource(Object templateSource) findTemplateSource(String name) Return an object wrapping a source for a templatelonggetLastModified(Object templateSource)
-
Constructor Details
-
ClassPathRepoTemplateLoader
public ClassPathRepoTemplateLoader(NodeService nodeService, ContentService contentService, String encoding)
-
-
Method Details
-
findTemplateSource
Return an object wrapping a source for a template- Specified by:
findTemplateSourcein interfacefreemarker.cache.TemplateLoader- Throws:
IOException
-
getLastModified
- Specified by:
getLastModifiedin interfacefreemarker.cache.TemplateLoader
-
getReader
- Specified by:
getReaderin interfacefreemarker.cache.TemplateLoader- Throws:
IOException
-
closeTemplateSource
- Specified by:
closeTemplateSourcein interfacefreemarker.cache.TemplateLoader- Throws:
IOException
-