Package com.morpheusdata.views
Class DynamicTemplateLoader
java.lang.Object
com.morpheusdata.views.DynamicTemplateLoader
- All Implemented Interfaces:
com.github.jknack.handlebars.io.TemplateLoader
public class DynamicTemplateLoader
extends Object
implements com.github.jknack.handlebars.io.TemplateLoader
Based on
CompositeTemplateLoader
Provides a way to delegate template lookups to all registered plugins-
Field Summary
Fields inherited from interface com.github.jknack.handlebars.io.TemplateLoader
DEFAULT_PREFIX, DEFAULT_SUFFIX
-
Constructor Summary
ConstructorDescriptionDynamicTemplateLoader
(com.github.jknack.handlebars.io.TemplateLoader... loaders) Creates a newCompositeTemplateLoader
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTemplateLoader
(com.github.jknack.handlebars.io.TemplateLoader loader) Iterable<com.github.jknack.handlebars.io.TemplateLoader>
Returns the delegates template loaders.void
removeTemplateLoader
(com.github.jknack.handlebars.io.TemplateLoader loader) void
setCharset
(Charset charset) void
void
com.github.jknack.handlebars.io.TemplateSource
-
Constructor Details
-
DynamicTemplateLoader
public DynamicTemplateLoader(com.github.jknack.handlebars.io.TemplateLoader... loaders) Creates a newCompositeTemplateLoader
.- Parameters:
loaders
- The template loader chain. At least two loaders must be provided.
-
-
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
-
getTemplateLoaders
Returns the delegates template loaders.- Returns:
- The delegates template loaders.
-
addTemplateLoader
public void addTemplateLoader(com.github.jknack.handlebars.io.TemplateLoader loader) -
removeTemplateLoader
public void removeTemplateLoader(com.github.jknack.handlebars.io.TemplateLoader loader)
-