Package com.codebarrel.api.templates
Class MustacheTemplateRenderer
java.lang.Object
com.codebarrel.api.templates.MustacheTemplateRenderer
- All Implemented Interfaces:
TemplateRenderer
-
Constructor Summary
ConstructorsConstructorDescriptionMustacheTemplateRenderer(I18nFactory i18nFactory, StaticPrefixProvider staticPrefixProvider, PartialSupplier partialSupplier) -
Method Summary
-
Constructor Details
-
MustacheTemplateRenderer
@Inject public MustacheTemplateRenderer(I18nFactory i18nFactory, StaticPrefixProvider staticPrefixProvider, PartialSupplier partialSupplier)
-
-
Method Details
-
render
Description copied from interface:TemplateRendererRenders 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:
renderin interfaceTemplateRenderer- Parameters:
locale- the locale of the user making the requesttemplateLocation- the classpath template location.params- A POJO or Map<String, Object> parametersout- The writer to write to.
-