Package io.dropwizard.views.mustache
Class MustacheViewRenderer
- java.lang.Object
-
- io.dropwizard.views.mustache.MustacheViewRenderer
-
- All Implemented Interfaces:
ViewRenderer
public class MustacheViewRenderer extends Object implements ViewRenderer
AViewRendererwhich renders Mustache (.mustache) templates.
-
-
Constructor Summary
Constructors Constructor Description MustacheViewRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Map<String,String> options)options for configuring the view rendererStringgetConfigurationKey()booleanisRenderable(View view)Returnstrueif the renderer can render the givenView.voidrender(View view, Locale locale, OutputStream output)
-
-
-
Method Detail
-
isRenderable
public boolean isRenderable(View view)
Description copied from interface:ViewRendererReturnstrueif the renderer can render the givenView.- Specified by:
isRenderablein interfaceViewRenderer- Parameters:
view- a view- Returns:
trueifviewcan be rendered
-
render
public void render(View view, Locale locale, OutputStream output) throws IOException
Description copied from interface:ViewRenderer- Specified by:
renderin interfaceViewRenderer- Parameters:
view- a viewlocale- the locale in which the view should be renderedoutput- the output stream- Throws:
IOException- if there is an error writing tooutput
-
configure
public void configure(Map<String,String> options)
Description copied from interface:ViewRendereroptions for configuring the view renderer- Specified by:
configurein interfaceViewRenderer
-
getConfigurationKey
public String getConfigurationKey()
- Specified by:
getConfigurationKeyin interfaceViewRenderer- Returns:
- the key to use in the view configurations, i.e. 'freemarker' or 'mustache'.
-
-