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

    • DynamicTemplateLoader

      public DynamicTemplateLoader(com.github.jknack.handlebars.io.TemplateLoader... loaders)
      Creates a new CompositeTemplateLoader.
      Parameters:
      loaders - The template loader chain. At least two loaders must be provided.
  • Method Details

    • sourceAt

      public com.github.jknack.handlebars.io.TemplateSource sourceAt(String location) throws IOException
      Specified by:
      sourceAt in interface com.github.jknack.handlebars.io.TemplateLoader
      Throws:
      IOException
    • resolve

      public String resolve(String location)
      Specified by:
      resolve in interface com.github.jknack.handlebars.io.TemplateLoader
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in interface com.github.jknack.handlebars.io.TemplateLoader
    • getSuffix

      public String getSuffix()
      Specified by:
      getSuffix in interface com.github.jknack.handlebars.io.TemplateLoader
    • setPrefix

      public void setPrefix(String prefix)
      Specified by:
      setPrefix in interface com.github.jknack.handlebars.io.TemplateLoader
    • setSuffix

      public void setSuffix(String suffix)
      Specified by:
      setSuffix in interface com.github.jknack.handlebars.io.TemplateLoader
    • setCharset

      public void setCharset(Charset charset)
      Specified by:
      setCharset in interface com.github.jknack.handlebars.io.TemplateLoader
    • getCharset

      public Charset getCharset()
      Specified by:
      getCharset in interface com.github.jknack.handlebars.io.TemplateLoader
    • getTemplateLoaders

      public Iterable<com.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)