Class ProtocolBasedDelegatingTemplateLoader
java.lang.Object
org.onehippo.forge.templating.support.handlebars.servlet.ProtocolBasedDelegatingTemplateLoader
- All Implemented Interfaces:
com.github.jknack.handlebars.io.TemplateLoader
public class ProtocolBasedDelegatingTemplateLoader
extends Object
implements com.github.jknack.handlebars.io.TemplateLoader
Protocol based delegating
TemplateLoader
implementation.
For example, if a given template path is "webfile:/a/b/c.hbs", then "webfile:" is regardes as its protocol.-
Field Summary
Fields inherited from interface com.github.jknack.handlebars.io.TemplateLoader
DEFAULT_PREFIX, DEFAULT_SUFFIX
-
Constructor Summary
ConstructorDescriptionProtocolBasedDelegatingTemplateLoader
(Map<String, com.github.jknack.handlebars.io.TemplateLoader> protocolTemplateLoadersMap) Construct a delegatingTemplateLoader
based on the given map with pairs of protocol and corresponding delegatingTemplateLoader
instance -
Method Summary
-
Constructor Details
-
ProtocolBasedDelegatingTemplateLoader
public ProtocolBasedDelegatingTemplateLoader(Map<String, com.github.jknack.handlebars.io.TemplateLoader> protocolTemplateLoadersMap) Construct a delegatingTemplateLoader
based on the given map with pairs of protocol and corresponding delegatingTemplateLoader
instance- Parameters:
protocolTemplateLoadersMap
- map with pairs of protocol and corresponding delegatingTemplateLoader
instance.
-
-
Method Details
-
sourceAt
- Specified by:
sourceAt
in interfacecom.github.jknack.handlebars.io.TemplateLoader
- Throws:
IOException
-
resolve
- Specified by:
resolve
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-
getPrefix
- Specified by:
getPrefix
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-
getSuffix
- Specified by:
getSuffix
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-
setPrefix
- Specified by:
setPrefix
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-
setSuffix
- Specified by:
setSuffix
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-
setCharset
- Specified by:
setCharset
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-
getCharset
- Specified by:
getCharset
in interfacecom.github.jknack.handlebars.io.TemplateLoader
-