public class DelegatingTemplateLoader extends Object implements freemarker.cache.TemplateLoader
First of all, this template loader returns null if the template path starts with any of the given prefixExclusions
.
prefixExclusions
option always precedes prefixInclusions
option.
Second, this template loader does delegation if prefixInclusions
is empty or
if the template path starts with any of the given prefixInclusions
unless the template path starts with any of prefixExclusions
.
Third, if the template path doesn't start with any of a non-empty prefixInclusions
regardless of prefixExclusions
,
then this simply returns null.
Constructor and Description |
---|
DelegatingTemplateLoader(freemarker.cache.TemplateLoader delegatee,
String[] prefixInclusions,
String[] prefixExclusions) |
Modifier and Type | Method and Description |
---|---|
void |
closeTemplateSource(Object templateSource) |
Object |
findTemplateSource(String name) |
long |
getLastModified(Object templateSource) |
Reader |
getReader(Object templateSource,
String encoding) |
public Object findTemplateSource(String name) throws IOException
findTemplateSource
in interface freemarker.cache.TemplateLoader
IOException
public long getLastModified(Object templateSource)
getLastModified
in interface freemarker.cache.TemplateLoader
public Reader getReader(Object templateSource, String encoding) throws IOException
getReader
in interface freemarker.cache.TemplateLoader
IOException
public void closeTemplateSource(Object templateSource) throws IOException
closeTemplateSource
in interface freemarker.cache.TemplateLoader
IOException
Copyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.