Package org.apache.jackrabbit.api.binary
Class BinaryDownloadOptions
- java.lang.Object
-
- org.apache.jackrabbit.api.binary.BinaryDownloadOptions
-
@ProviderType public final class BinaryDownloadOptions extends java.lang.Object
Specifies the options to be used when obtaining a direct download URI viaBinaryDownload.getURI(BinaryDownloadOptions)
. Setting these options allows the caller to instruct the service provider that these options should be applied to the response to a request made with the URI returned.To specify download options, obtain a
BinaryDownloadOptions.BinaryDownloadOptionsBuilder
via thebuilder()
method, then specify the options desired and get the object viaBinaryDownloadOptions.BinaryDownloadOptionsBuilder.build()
.If no options are needed, use
DEFAULT
which instructs the implementation to use the service provider default behavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BinaryDownloadOptions.BinaryDownloadOptionsBuilder
Used to build an instance ofBinaryDownloadOptions
with the options set as desired by the caller.
-
Field Summary
Fields Modifier and Type Field Description static BinaryDownloadOptions
DEFAULT
Provides a default instance of this class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull BinaryDownloadOptions.BinaryDownloadOptionsBuilder
builder()
Returns aBinaryDownloadOptions.BinaryDownloadOptionsBuilder
instance to be used for creating an instance of this class.@Nullable java.lang.String
getCharacterEncoding()
Returns the character encoding that should be assumed for the binary that is to be downloaded.@NotNull java.lang.String
getDispositionType()
Returns the disposition type that should be assumed for the binary that is to be downloaded.@Nullable java.lang.String
getFileName()
Returns the filename that should be assumed for the binary that is to be downloaded.@Nullable java.lang.String
getMediaType()
Returns the internet media type that should be assumed for the binary that is to be downloaded.boolean
isDownloadDomainIgnored()
Returns a boolean value that indicates whether the data store should ignore any provided download domain override configuration value when generating the signed URI.
-
-
-
Field Detail
-
DEFAULT
public static final BinaryDownloadOptions DEFAULT
Provides a default instance of this class. Using the default instance indicates that the caller is willing to accept the service provider default behavior.
-
-
Method Detail
-
getMediaType
@Nullable public final @Nullable java.lang.String getMediaType()
Returns the internet media type that should be assumed for the binary that is to be downloaded. This value should be a validjcr:mimeType
. This value can be set by callingBinaryDownloadOptions.BinaryDownloadOptionsBuilder.withMediaType(String)
when building an instance of this class.- Returns:
- A String representation of the internet media type, or
null
if no type has been specified. - See Also:
- JCR 2.0 Repository Model - jcr:mimeType
-
getCharacterEncoding
@Nullable public final @Nullable java.lang.String getCharacterEncoding()
Returns the character encoding that should be assumed for the binary that is to be downloaded. This value should be a validjcr:encoding
. It can be set by callingBinaryDownloadOptions.BinaryDownloadOptionsBuilder.withCharacterEncoding(String)
when building an instance of this class.- Returns:
- The character encoding, or
null
if no encoding has been specified. - See Also:
- JCR 2.0 Repository Model - jcr:encoding
-
getFileName
@Nullable public final @Nullable java.lang.String getFileName()
Returns the filename that should be assumed for the binary that is to be downloaded. This value can be set by callingBinaryDownloadOptions.BinaryDownloadOptionsBuilder.withFileName(String)
when building an instance of this class.- Returns:
- The file name, or
null
if no file name has been specified.
-
getDispositionType
@NotNull public final @NotNull java.lang.String getDispositionType()
Returns the disposition type that should be assumed for the binary that is to be downloaded. This value can be set by callingBinaryDownloadOptions.BinaryDownloadOptionsBuilder.withDispositionTypeInline()
orBinaryDownloadOptions.BinaryDownloadOptionsBuilder.withDispositionTypeAttachment()
when building an instance of this class. The default value of this setting is "inline".- Returns:
- The disposition type.
- See Also:
- RFC 6266, Section 4.2
-
isDownloadDomainIgnored
public boolean isDownloadDomainIgnored()
Returns a boolean value that indicates whether the data store should ignore any provided download domain override configuration value when generating the signed URI. This value can be set by callingBinaryDownloadOptions.BinaryDownloadOptionsBuilder.withDomainOverrideIgnored(boolean)
. The default value of this setting is false.- Returns:
- true if the domain override should be ignored; false otherwise.
-
builder
@NotNull public static @NotNull BinaryDownloadOptions.BinaryDownloadOptionsBuilder builder()
Returns aBinaryDownloadOptions.BinaryDownloadOptionsBuilder
instance to be used for creating an instance of this class.- Returns:
- A builder instance.
-
-