@Produces(value="text/html") @Requires(classes=com.google.template.soy.jbcsrc.api.SoySauce.class) @Singleton public class SoySauceViewsRenderer extends java.lang.Object implements ViewsRenderer
Modifier and Type | Field and Description |
---|---|
protected SoyNamingMapProvider |
namingMapProvider |
protected SoyViewsRendererConfigurationProperties |
soyMicronautConfiguration |
protected com.google.template.soy.jbcsrc.api.SoySauce |
soySauce |
protected ViewsConfiguration |
viewsConfiguration |
EXTENSION_SEPARATOR
Constructor and Description |
---|
SoySauceViewsRenderer(ViewsConfiguration viewsConfiguration,
CspConfiguration cspConfiguration,
SoyNamingMapProvider namingMapProvider,
SoyViewsRendererConfigurationProperties soyConfiguration) |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.lang.String view) |
io.micronaut.core.io.Writable |
render(java.lang.String viewName,
java.lang.Object data) |
io.micronaut.core.io.Writable |
render(java.lang.String viewName,
java.lang.Object data,
io.micronaut.http.HttpRequest<?> request) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
modelOf
protected final ViewsConfiguration viewsConfiguration
protected final SoyViewsRendererConfigurationProperties soyMicronautConfiguration
protected final SoyNamingMapProvider namingMapProvider
protected final com.google.template.soy.jbcsrc.api.SoySauce soySauce
@Inject public SoySauceViewsRenderer(ViewsConfiguration viewsConfiguration, @Nullable CspConfiguration cspConfiguration, @Nullable SoyNamingMapProvider namingMapProvider, SoyViewsRendererConfigurationProperties soyConfiguration)
viewsConfiguration
- Views configuration properties.cspConfiguration
- Content-Security-Policy configuration.namingMapProvider
- Soy naming map providersoyConfiguration
- Soy configuration properties.@NonNull public io.micronaut.core.io.Writable render(@NonNull java.lang.String viewName, @Nullable java.lang.Object data)
render
in interface ViewsRenderer
viewName
- view name to be renderdata
- response body to render it with a view@NonNull public io.micronaut.core.io.Writable render(@NonNull java.lang.String viewName, @Nullable java.lang.Object data, @NonNull io.micronaut.http.HttpRequest<?> request)
render
in interface ViewsRenderer
viewName
- view name to be renderdata
- response body to render it with a viewrequest
- HTTP requestpublic boolean exists(@NonNull java.lang.String view)
exists
in interface ViewsRenderer
view
- view name to be rendered