@Produces(value="text/html") @Singleton public class VelocityViewsRenderer extends java.lang.Object implements ViewsRenderer
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
folder |
protected VelocityViewsRendererConfiguration |
velocityConfiguration |
protected org.apache.velocity.app.VelocityEngine |
velocityEngine |
protected ViewsConfiguration |
viewsConfiguration |
EXTENSION_SEPARATOR, FILE_SEPARATOR
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.lang.String viewName) |
io.micronaut.core.io.Writable |
render(java.lang.String view,
java.lang.Object data) |
void |
render(java.lang.String view,
org.apache.velocity.VelocityContext context,
java.lang.String encoding,
java.io.Writer writer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
modelOf, normalizeFile, normalizeFolder, render
protected final org.apache.velocity.app.VelocityEngine velocityEngine
protected final ViewsConfiguration viewsConfiguration
protected final VelocityViewsRendererConfiguration velocityConfiguration
protected final java.lang.String folder
@Nonnull public io.micronaut.core.io.Writable render(@Nonnull java.lang.String view, @Nullable java.lang.Object data)
render
in interface ViewsRenderer
view
- view name to be renderdata
- response body to render it with a viewpublic void render(@Nonnull java.lang.String view, org.apache.velocity.VelocityContext context, java.lang.String encoding, java.io.Writer writer)
view
- The viewcontext
- The contextencoding
- The encodingwriter
- The writerpublic boolean exists(@Nonnull java.lang.String viewName)
exists
in interface ViewsRenderer
viewName
- view name to be render