Package io.dropwizard.views.common
Interface ViewRenderer
- All Known Implementing Classes:
FreemarkerViewRenderer
,MustacheViewRenderer
public interface ViewRenderer
The rendering engine for a type of view.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
options for configuring the view rendererboolean
isRenderable
(View view) Returnstrue
if the renderer can render the givenView
.void
render
(View view, Locale locale, OutputStream output)
-
Method Details
-
isRenderable
Returnstrue
if the renderer can render the givenView
.- Parameters:
view
- a view- Returns:
true
ifview
can be rendered
-
render
- 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
jakarta.ws.rs.WebApplicationException
- if there is an error rendering the template
-
configure
options for configuring the view renderer- Parameters:
options
-
-
getConfigurationKey
String getConfigurationKey()- Returns:
- the key to use in the view configurations, i.e. 'freemarker' or 'mustache'.
-