Package com.morpheusdata.views
Class HandlebarsPluginTemplateLoader
java.lang.Object
com.github.jknack.handlebars.io.AbstractTemplateLoader
com.morpheusdata.views.HandlebarsPluginTemplateLoader
- All Implemented Interfaces:
com.github.jknack.handlebars.io.TemplateLoader
public class HandlebarsPluginTemplateLoader
extends com.github.jknack.handlebars.io.AbstractTemplateLoader
A Template Loader for handlebars that sets some defaults and uses an injected classloader
Default prefix "hbs/"
Default suffix ".hbs"
-
Field Summary
Fields inherited from interface com.github.jknack.handlebars.io.TemplateLoader
DEFAULT_PREFIX, DEFAULT_SUFFIX
-
Constructor Summary
ConstructorDescriptionHandlebarsPluginTemplateLoader
(ClassLoader classLoader) HandlebarsPluginTemplateLoader
(String prefix, ClassLoader classLoader) -
Method Summary
Modifier and TypeMethodDescriptionprotected URL
getResource
(String location) Finds the requested resource using the provided ClassLoadercom.github.jknack.handlebars.io.TemplateSource
Methods inherited from class com.github.jknack.handlebars.io.AbstractTemplateLoader
getCharset, getPrefix, getSuffix, normalize, resolve, setCharset, setPrefix, setSuffix
-
Constructor Details
-
HandlebarsPluginTemplateLoader
-
HandlebarsPluginTemplateLoader
-
-
Method Details
-
sourceAt
- Throws:
IOException
-
getResource
Finds the requested resource using the provided ClassLoader- Parameters:
location
- resource URI- Returns:
- URL for the resource within the plugin
-