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