Package io.micronaut.views.rocker
Class RockerViewsRenderer<T,R>
java.lang.Object
io.micronaut.views.rocker.RockerViewsRenderer<T,R>
- Type Parameters:
T
- The model typeR
- The request type
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,ViewsRenderer<T,
R>
Renders templates with Rocker.
- Since:
- 1.3.2
- Author:
- Sam Adams
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final RockerViewsRendererConfiguration
protected final RockerEngine
protected final ViewsConfiguration
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionRockerViewsRenderer
(ViewsConfiguration viewsConfiguration, RockerViewsRendererConfiguration rockerConfiguration, RockerEngine rockerEngine) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Field Details
-
rockerEngine
-
viewsConfiguration
-
rockerConfiguration
-
folder
-
-
Constructor Details
-
RockerViewsRenderer
@Inject public RockerViewsRenderer(ViewsConfiguration viewsConfiguration, RockerViewsRendererConfiguration rockerConfiguration, RockerEngine rockerEngine) - Parameters:
viewsConfiguration
- Views ConfigurationrockerConfiguration
- Rocker ConfigurationrockerEngine
- Rocker Engine
-
-
Method Details
-
render
@NonNull public @NonNull io.micronaut.core.io.Writable render(@NonNull @NonNull String view, @Nullable T data, @Nullable R request) - Specified by:
render
in interfaceViewsRenderer<T,
R> - Parameters:
view
- view name to be rendereddata
- response body to render it with a viewrequest
- HTTP request- Returns:
- A writable where the view will be written to.
-
exists
- Specified by:
exists
in interfaceViewsRenderer<T,
R> - Parameters:
viewName
- view name to be rendered- Returns:
- true if a template can be found for the supplied view name.
-