Class MustacheTemplateRenderer

java.lang.Object
com.codebarrel.api.templates.MustacheTemplateRenderer
All Implemented Interfaces:
TemplateRenderer

@Singleton public class MustacheTemplateRenderer extends Object implements TemplateRenderer
  • Constructor Details

  • Method Details

    • render

      public void render(Locale locale, String templateLocation, Object params, Writer out)
      Description copied from interface: TemplateRenderer
      Renders the template at the given location (looked up via classpath) using the params provided. params can either be a POJO or a Map<String,Object> of parameters.

      Will throw an IllegalArgumentException if the template specified can't be found.

      Specified by:
      render in interface TemplateRenderer
      Parameters:
      locale - the locale of the user making the request
      templateLocation - the classpath template location.
      params - A POJO or Map<String, Object> parameters
      out - The writer to write to.