public static final class FileTypes.Info.Builder
extends java.lang.Object
FileTypes.Info
.Constructor and Description |
---|
Builder(java.lang.String name,
long bytesTransferred,
FileTypes.PrepareStatus status)
Constructor with parameters for the required properties of
FileTypes.Info . |
Modifier and Type | Method and Description |
---|---|
FileTypes.Info |
build() |
FileTypes.Info.Builder |
setChecksumInfo(FileTypes.ChecksumInfo checksumInfo)
The checksum information of the file.
|
FileTypes.Info.Builder |
setDownloadEndpoint(TransferEndpoint downloadEndpoint)
Endpoint at which the file is available for download.
|
FileTypes.Info.Builder |
setErrorMessage(LocalizableMessage errorMessage)
Error message for a failed preparation when the prepare status is
FileTypes.PrepareStatus.ERROR . |
FileTypes.Info.Builder |
setSize(java.lang.Long size)
The file size, in bytes.
|
public Builder(java.lang.String name, long bytesTransferred, FileTypes.PrepareStatus status)
FileTypes.Info
.public FileTypes.Info.Builder setSize(java.lang.Long size)
size
- New value for the property.public FileTypes.Info.Builder setDownloadEndpoint(TransferEndpoint downloadEndpoint)
FileTypes.Info.getStatus()
is
FileTypes.PrepareStatus.PREPARED
.
This property won't be set until the file status is FileTypes.PrepareStatus.PREPARED
.downloadEndpoint
- New value for the property.public FileTypes.Info.Builder setChecksumInfo(FileTypes.ChecksumInfo checksumInfo)
File.get(java.lang.String, java.lang.String)
method to verify the
checksum for the downloaded file.
The checksum is always calculated for the downloaded file, but this property
won't be set until the download is complete.checksumInfo
- New value for the property.public FileTypes.Info.Builder setErrorMessage(LocalizableMessage errorMessage)
FileTypes.PrepareStatus.ERROR
.
This property won't be set unless there was an error with the file transfer.errorMessage
- New value for the property.public FileTypes.Info build()