Package io.micronaut.views
Interface ViewsRenderer<T,R>
- Type Parameters:
T
- The model typeR
- The request type
- All Superinterfaces:
io.micronaut.core.order.Ordered
- All Known Implementing Classes:
FreemarkerViewsRenderer
,HandlebarsViewsRenderer
,HtmlJteViewsRenderer
,JteViewsRenderer
,PebbleViewsRenderer
,PlainJteViewsRenderer
,RockerViewsRenderer
,SoySauceViewsRenderer
,ThymeleafViewsRenderer
,VelocityViewsRenderer
public interface ViewsRenderer<T,R>
extends io.micronaut.core.order.Ordered
Interface to be implemented by View Engines implementations.
- Since:
- 1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Method Details
-
render
@NonNull @NonNull io.micronaut.core.io.Writable render(@NonNull @NonNull String viewName, @Nullable T data, @Nullable R request) - Parameters:
viewName
- 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
- Parameters:
viewName
- view name to be rendered- Returns:
- true if a template can be found for the supplied view name.
-