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"
  • Constructor Details

    • HandlebarsPluginTemplateLoader

      public HandlebarsPluginTemplateLoader(ClassLoader classLoader)
    • HandlebarsPluginTemplateLoader

      public HandlebarsPluginTemplateLoader(String prefix, ClassLoader classLoader)
  • Method Details

    • sourceAt

      public com.github.jknack.handlebars.io.TemplateSource sourceAt(String uri) throws IOException
      Throws:
      IOException
    • getResource

      protected URL getResource(String location)
      Finds the requested resource using the provided ClassLoader
      Parameters:
      location - resource URI
      Returns:
      URL for the resource within the plugin