Streams a stored content item to the response, looked up by content name and an optional storage directory. Created via ViewsBuilder.contentFileView(...) from server-side JS and returned from a controller as the view for a request. Content is normally read through FileStorageManager, scoped to the current tenant; a legacy special case reads uploaded report tables through TableUploadManager when the directory is "reports" and the content name has a "content-table:" prefix, kept for backwards compatibility.
Group: Views
Implements: View, Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| contentType | String | The content type supplied at construction, sent as the response's content type. |
| description | String | Short, user-facing label for this view, always "Content file view". |
Methods
getDescription()
Returns: String
Short, user-facing label for this view, always "Content file view".
render(CommonResource page, OutputStream out, Range range, Map<String,String> params, String contentType)
Returns: void
Writes the stored content's bytes to the response output stream. Reads through TableUploadManager for the legacy "reports" / "content-table:" case, otherwise reads through FileStorageManager, scoped by directory when one was given at construction.
| Parameter | Description |
|---|---|
page | the resource the view is being rendered for, not used by this view |
out | the stream the content bytes are written to |
range | not used by this view; the full content is always written |
params | request parameters, not used by this view |
contentType | not used by this view; getContentType() supplies the response content type |
getContentType()
Returns: String
The content type supplied at construction, sent as the response's content type.