public static class DownloadMediaOptions.Builder
extends java.lang.Object
DownloadMediaOptions
.Constructor and Description |
---|
DownloadMediaOptions.Builder() |
Modifier and Type | Method and Description |
---|---|
DownloadMediaOptions.Builder |
allowStretch(boolean allowStretch)
Allow stretching the image beyond its original size.
|
DownloadMediaOptions.Builder |
backgroundColor(java.lang.String color)
Background color for the border added when an image is stretched beyond its original size
and
allowStretch(boolean) =false. |
DownloadMediaOptions |
build()
Builds
DownloadMediaOptions . |
DownloadMediaOptions.Builder |
database(java.lang.String database)
The name of the Sitecore database to pull the image from.
|
DownloadMediaOptions.Builder |
disableMediaCaching(boolean disable)
Disable the media cache for this request.
|
DownloadMediaOptions.Builder |
height(int height)
The height of the image.
|
DownloadMediaOptions.Builder |
language(java.lang.String language)
Retrieve the image from a specific language version of the item.
|
DownloadMediaOptions.Builder |
maxHeight(int maxHeight)
Maximum height of the image to display.
|
DownloadMediaOptions.Builder |
maxWidth(int maxWidth)
Maximum width of the image to display.
|
DownloadMediaOptions.Builder |
scale(float scale)
Scale factor for the image to display.
|
DownloadMediaOptions.Builder |
thumbnail(boolean thumbnail)
Display a thumbnail of the requested file, useful for images as well as other media types, such as PDF,
flash, and so on.
|
DownloadMediaOptions.Builder |
version(int version)
Retrieve the image from a specific version of the item.
|
DownloadMediaOptions.Builder |
width(int width)
The width of the image.
|
public DownloadMediaOptions.Builder width(int width)
allowStretch(boolean)
if the width will be larger than its
original size.width
- image width.public DownloadMediaOptions.Builder height(int height)
allowStretch(boolean)
if the height will be larger than its
original size.height
- image height.public DownloadMediaOptions.Builder maxWidth(int maxWidth)
maxWidth
- maximum image width.public DownloadMediaOptions.Builder maxHeight(int maxHeight)
maxHeight
- maximum image height.public DownloadMediaOptions.Builder language(java.lang.String language)
language
- language.public DownloadMediaOptions.Builder version(int version)
version
- version number.public DownloadMediaOptions.Builder database(java.lang.String database)
database
- database name.public DownloadMediaOptions.Builder backgroundColor(java.lang.String color)
allowStretch(boolean)
=false.color
- color.public DownloadMediaOptions.Builder allowStretch(boolean allowStretch)
allowStretch
- whether to allow stretch.public DownloadMediaOptions.Builder scale(float scale)
allowStretch(boolean)
if the image will be scaled to
larger than its original size.
Any positive floating point number using a dot such as 1.5, which corresponds to 150%.scale
- scale.public DownloadMediaOptions.Builder thumbnail(boolean thumbnail)
thumbnail
- whether to show thumbnail.public DownloadMediaOptions.Builder disableMediaCaching(boolean disable)
disable
- whether to use media cache for request.public DownloadMediaOptions build()
DownloadMediaOptions
.DownloadMediaOptions
parameters.