Package io.dropwizard.views.common
Interface ViewRenderer
-
public interface ViewRenderer
The rendering engine for a type of view.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
configure(Map<String,String> options)
options for configuring the view rendererString
getConfigurationKey()
boolean
isRenderable(View view)
Returnstrue
if the renderer can render the givenView
.void
render(View view, Locale locale, OutputStream output)
-
-
-
Method Detail
-
isRenderable
boolean isRenderable(View view)
Returnstrue
if the renderer can render the givenView
.- Parameters:
view
- a view- Returns:
true
ifview
can be rendered
-
render
void render(View view, Locale locale, OutputStream output) throws IOException
- 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
void configure(Map<String,String> options)
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'.
-
-