All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getURI(BinaryDownloadOptions downloadOptions)Returns a URI for downloading this binary directly from the storage location.
@Nullable @Nullable URI getURI(BinaryDownloadOptions downloadOptions) throws RepositoryExceptionReturns a URI for downloading this binary directly from the storage location.
downloadOptionsparameter, some response headers of the download request can be overwritten, if supported by the storage provider. This is necessary to pass information that is only stored in the JCR in application specific structures, and not reliably available in the binary storage.
BinaryDownloadOptionssupports, but is not limited to:
Content-Type media type: typically available in a
Content-Type charset: for media types defining a "charset", typically available in a
Content-Disposition filename: download file name, typically taken from a JCR node name in the parent hierarchy, such as the nt:file node name
Content-Disposition type: whether to show the content inline of a page (inline) or enforce a download/save as (attachment)
BinaryDownloadOptions.DEFAULTwill use mostly empty defaults, relying on the storage provider attributes for this binary (that might be empty or different from the information in the JCR).
- The URI cannot be shared with other users. It must only be returned to authenticated requests corresponding to this session user or trusted system components.
- The URI must not be persisted for later use and will typically be time limited.
- The URI will only grant access to this particular binary.
- The client cannot infer any semantics from the URI structure and path names. It would typically include a cryptographic signature. Any change to the URI will likely result in a failing request.
BinaryDownloadOptionsinstance which is used to request specific options on the binary to be downloaded.
BinaryDownloadOptions.DEFAULTshould be used if the caller wishes to accept the storage provider's default behavior.
- A URI for downloading the binary directly, or
nullif the binary cannot be downloaded directly or if the underlying implementation does not support this capability.
RepositoryException- if an error occurs trying to locate the binary.