public class FreemarkerViewRenderer extends Object implements ViewRenderer
ViewRenderer
which renders Freemarker (.ftl, .ftlh or .ftlx
) templates.Constructor and Description |
---|
FreemarkerViewRenderer()
Deprecated.
Use
FreemarkerViewRenderer(Version) instead. |
FreemarkerViewRenderer(freemarker.template.Version incompatibleImprovementsVersion) |
Modifier and Type | Method and Description |
---|---|
void |
configure(Map<String,String> baseConfig)
options for configuring the view renderer
|
String |
getConfigurationKey() |
boolean |
isRenderable(View view)
Returns
true if the renderer can render the given View . |
void |
render(View view,
Locale locale,
OutputStream output)
|
public FreemarkerViewRenderer()
FreemarkerViewRenderer(Version)
instead.public FreemarkerViewRenderer(freemarker.template.Version incompatibleImprovementsVersion)
incompatibleImprovementsVersion
- FreeMarker version number for backward compatible bug fixes and improvements.
See Configuration.Configuration(Version)
for more information.public boolean isRenderable(View view)
ViewRenderer
true
if the renderer can render the given View
.isRenderable
in interface ViewRenderer
view
- a viewtrue
if view
can be renderedpublic void render(View view, Locale locale, OutputStream output) throws IOException
ViewRenderer
render
in interface ViewRenderer
view
- a viewlocale
- the locale in which the view should be renderedoutput
- the output streamIOException
- if there is an error writing to output
public void configure(Map<String,String> baseConfig)
ViewRenderer
configure
in interface ViewRenderer
public String getConfigurationKey()
getConfigurationKey
in interface ViewRenderer
Copyright © 2020. All rights reserved.