Class ViewUtils
java.lang.Object
io.micronaut.views.ViewUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a view model for the given data.static @NonNull StringnormalizeFile(@NonNull String path, String extension) Returns a path that is converted to unix style file separators and never starts with a "/".static @NonNull StringnormalizeFolder(@Nullable String path) Returns a path with unix style folder separators that starts and ends with a "/".
-
Field Details
-
EXTENSION_SEPARATOR
-
-
Constructor Details
-
ViewUtils
public ViewUtils()
-
-
Method Details
-
modelOf
-
normalizeFolder
-
normalizeFile
Returns a path that is converted to unix style file separators and never starts with a "/". If an extension is provided and the path ends with the extension, the extension will be stripped. The extension parameter supports extensions that do and do not begin with a ".".- Parameters:
path- The path to normalizeFileextension- The file extension- Returns:
- The normalized path
-