Class DataRecordDownloadOptions
java.lang.Object
org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess.DataRecordDownloadOptions
Contains download options for downloading a data record directly from a
storage location using the direct download feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic DataRecordDownloadOptionsProvides a default implementation of this class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DataRecordDownloadOptionsfromBlobDownloadOptions(@NotNull org.apache.jackrabbit.oak.api.blob.BlobDownloadOptions downloadOptions) Create an instance of this class directly from aBlobDownloadOptionsinstance.@Nullable StringReturns the character encoding of this instance.@Nullable StringGenerate the correct HTTPContent-Dispositionheader value from thefileNameanddispositionTypein this class, if set.@Nullable StringGenerate the correct HTTPContent-Typeheader value from themediaTypeandcharacterEncodingin this class, if set.@Nullable StringReturns the disposition type of this instance.@Nullable StringReturns the file name of this instance.@Nullable StringReturns the media type of this instance.booleanIndicates whether the data store should ignore any configured download domain override value when generating the signed download URI.
-
Field Details
-
DEFAULT
Provides a default implementation of this class. Clients should use this instance when they have no options to specify and are willing to accept the service provider default behavior.
-
-
Method Details
-
fromBlobDownloadOptions
public static DataRecordDownloadOptions fromBlobDownloadOptions(@NotNull @NotNull org.apache.jackrabbit.oak.api.blob.BlobDownloadOptions downloadOptions) Create an instance of this class directly from aBlobDownloadOptionsinstance.- Parameters:
downloadOptions- The download options to use to initialize this instance.- Returns:
- The new instance of this class.
-
getContentTypeHeader
Generate the correct HTTPContent-Typeheader value from themediaTypeandcharacterEncodingin this class, if set.If
mediaTypehas not been given a value, this method will returnnull.- Returns:
- The correct value for a
Content-Typeheader, ornullif themediaTypehas not been specified.
-
getContentDispositionHeader
Generate the correct HTTPContent-Dispositionheader value from thefileNameanddispositionTypein this class, if set.A value will be returned if the file name has been set, OR if the disposition type has been explicitly set to "attachment". Otherwise
nullwill be returned.- Returns:
- The correct value for a
Content-Dispositionheader, ornullif thefileNamehas not been specified and thedispositionTypehas not been set to "attachment".
-
getMediaType
Returns the media type of this instance.- Returns:
- The media type, or
nullif it has not been set.
-
getCharacterEncoding
Returns the character encoding of this instance.- Returns:
- The character encoding, or
nullif it has not been set.
-
getFileName
Returns the file name of this instance.- Returns:
- The file name, or
nullif it has not been set.
-
getDispositionType
Returns the disposition type of this instance.- Returns:
- The disposition type, or
nullif it has not been set.
-
isDomainOverrideIgnored
public boolean isDomainOverrideIgnored()Indicates whether the data store should ignore any configured download domain override value when generating the signed download URI.- Returns:
- true if the domain override should be ignored; false otherwise.
-