public interface ViewsRenderer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTENSION_SEPARATOR
The extension separator.
|
static java.lang.String |
FILE_SEPARATOR
Deprecated.
Use
File.separator directly |
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.lang.String viewName) |
default java.util.Map<java.lang.String,java.lang.Object> |
modelOf(java.lang.Object data)
Creates a view model for the given data.
|
default java.lang.String |
normalizeFile(java.lang.String path,
java.lang.String extension)
Deprecated.
Use
ViewUtils.normalizeFile(String, String) instead |
default java.lang.String |
normalizeFolder(java.lang.String path)
Deprecated.
Use
ViewUtils.normalizeFolder(String) instead |
io.micronaut.core.io.Writable |
render(java.lang.String viewName,
java.lang.Object data) |
default io.micronaut.core.io.Writable |
render(java.lang.String viewName,
java.lang.Object data,
io.micronaut.http.HttpRequest<?> request) |
@Deprecated static final java.lang.String FILE_SEPARATOR
File.separator
directlystatic final java.lang.String EXTENSION_SEPARATOR
@Nonnull io.micronaut.core.io.Writable render(@Nonnull java.lang.String viewName, @Nullable java.lang.Object data)
viewName
- view name to be renderdata
- response body to render it with a view@Nonnull default io.micronaut.core.io.Writable render(@Nonnull java.lang.String viewName, @Nullable java.lang.Object data, @Nonnull io.micronaut.http.HttpRequest<?> request)
viewName
- view name to be renderdata
- response body to render it with a viewrequest
- HTTP requestboolean exists(@Nonnull java.lang.String viewName)
viewName
- view name to be render@Nonnull default java.util.Map<java.lang.String,java.lang.Object> modelOf(@Nullable java.lang.Object data)
data
- The data@Nonnull @Deprecated default java.lang.String normalizeFolder(@Nullable java.lang.String path)
ViewUtils.normalizeFolder(String)
insteadpath
- The path to normalizeFile@Nonnull @Deprecated default java.lang.String normalizeFile(@Nonnull java.lang.String path, java.lang.String extension)
ViewUtils.normalizeFile(String, String)
insteadpath
- The path to normalizeFileextension
- The file extension