public interface S3Dao
| Modifier and Type | Field and Description |
|---|---|
static String |
SIGNER_OVERRIDE_V4
The AWS signer type value to use when signing with Signature Version 4.
|
| Modifier and Type | Method and Description |
|---|---|
int |
abortMultipartUploads(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
Date thresholdDate)
Aborts any multipart uploads that were initiated in the specified S3 storage older than threshold date.
|
S3FileTransferResultsDto |
copyFile(S3FileCopyRequestParamsDto s3FileCopyRequestParamsDto)
Copies an S3 object from the source S3 bucket to the same path in target bucket.
|
void |
createDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Creates an S3 object of 0 byte size that represents a directory.
|
void |
deleteDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Deletes keys/key versions from specified bucket with matching prefix.
|
void |
deleteFileList(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Deletes a list of keys from specified bucket.
|
S3FileTransferResultsDto |
downloadDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Downloads a directory from S3 to the local file system.
|
S3FileTransferResultsDto |
downloadFile(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Downloads a file from S3 to the local file system.
|
String |
generateGetObjectPresignedUrl(String bucketName,
String key,
Date expiration,
S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Generates a GET pre-signed URL for the given object in S3 identified by its bucket name and key.
|
com.amazonaws.services.s3.model.ObjectMetadata |
getObjectMetadata(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Gets the metadata for the specified Amazon S3 object without actually fetching the object itself.
|
Properties |
getProperties(String bucketName,
String key,
S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Gets an object from S3 and parses it as a
Properties. |
List<com.amazonaws.services.s3.model.S3ObjectSummary> |
listDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Lists all S3 objects matching the S3 key prefix in the given bucket (S3 bucket name).
|
List<com.amazonaws.services.s3.model.S3ObjectSummary> |
listDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
boolean ignoreZeroByteDirectoryMarkers)
Lists all S3 objects matching the S3 key prefix in the given bucket (S3 bucket name).
|
List<com.amazonaws.services.s3.model.S3VersionSummary> |
listVersions(S3FileTransferRequestParamsDto params)
Lists all S3 versions matching the S3 key prefix in the given bucket (S3 bucket name).
|
void |
restoreObjects(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
int expirationInDays,
String archiveRetrievalOption)
Requests to restore a list of keys in the specified bucket.
|
boolean |
s3FileExists(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Validates that file exists in S3 using S3Client.getObject() method.
|
void |
tagObjects(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
S3FileTransferRequestParamsDto s3ObjectTaggerParamsDto,
List<com.amazonaws.services.s3.model.S3ObjectSummary> s3ObjectSummaries,
com.amazonaws.services.s3.model.Tag tag)
Tags S3 objects with the specified S3 object tag.
|
void |
tagVersions(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
S3FileTransferRequestParamsDto s3ObjectTaggerParamsDto,
List<com.amazonaws.services.s3.model.S3VersionSummary> s3VersionSummaries,
com.amazonaws.services.s3.model.Tag tag)
Tags S3 versions with the specified S3 object tag.
|
S3FileTransferResultsDto |
uploadDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Uploads a local directory of files into S3.
|
S3FileTransferResultsDto |
uploadFile(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Uploads a local file into S3.
|
S3FileTransferResultsDto |
uploadFileList(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Uploads a list of local files into S3.
|
void |
validateGlacierS3FilesRestored(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Validates that all specified Glacier storage class files are restored.
|
void |
validateS3File(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
Long fileSizeInBytes)
Validates that file exists in S3 and has size that equals to a specified value.
|
static final String SIGNER_OVERRIDE_V4
int abortMultipartUploads(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
Date thresholdDate)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name specifies the name of the bucket containing the
multipart uploads to abort.thresholdDate - the date indicating which multipart uploads should be abortedS3FileTransferResultsDto copyFile(S3FileCopyRequestParamsDto s3FileCopyRequestParamsDto)
throws InterruptedException
s3FileCopyRequestParamsDto - the S3 file copy request parameters.InterruptedException - if any problems were encountered.void createDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 object to be
created.void deleteDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 objects to be
deleted.void deleteFileList(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and the file list identify the S3 objects to be
deleted.S3FileTransferResultsDto downloadDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws InterruptedException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix are for the target of the copy. The
local path is the local file to be copied.InterruptedException - if any problems were encountered.S3FileTransferResultsDto downloadFile(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws InterruptedException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix are for the target of the copy. The
local path is the local file to be copied.InterruptedException - if any problems were encountered.String generateGetObjectPresignedUrl(String bucketName, String key, Date expiration, S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
S3FileTransferRequestParamsDto.bucketName - The bucket name of the objectkey - The S3 key to the objectexpiration - The expiration date at which point the new pre-signed URL will no longer be accepted by Amazon S3.s3FileTransferRequestParamsDto - The parameters which contain information on how to use S3com.amazonaws.services.s3.model.ObjectMetadata getObjectMetadata(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 object's whose
metadata is being retrieved.Properties getProperties(String bucketName, String key, S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
Properties.bucketName - The S3 bucket namekey - The S3 object keys3FileTransferRequestParamsDto - S3FileTransferRequestParamsDto with proxy informationPropertiesList<com.amazonaws.services.s3.model.S3ObjectSummary> listDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 objects to get
listed.List<com.amazonaws.services.s3.model.S3ObjectSummary> listDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto, boolean ignoreZeroByteDirectoryMarkers)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 objects to get
listed.ignoreZeroByteDirectoryMarkers - specifies whether to ignore 0 byte objects that represent S3 directories.List<com.amazonaws.services.s3.model.S3VersionSummary> listVersions(S3FileTransferRequestParamsDto params)
params - the S3 file transfer request parametersvoid restoreObjects(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
int expirationInDays,
String archiveRetrievalOption)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and the file list identify the S3 objects to be
restoredexpirationInDays - the time, in days, between when an object is restored to the bucket and when it expiresarchiveRetrievalOption - the archive retrieval option when restoring an archived objectboolean s3FileExists(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws RuntimeException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 fileRuntimeException - if file existence check failsvoid tagObjects(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
S3FileTransferRequestParamsDto s3ObjectTaggerParamsDto,
List<com.amazonaws.services.s3.model.S3ObjectSummary> s3ObjectSummaries,
com.amazonaws.services.s3.model.Tag tag)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. This set of parameters contains the S3 bucket names3ObjectTaggerParamsDto - the S3 file transfer request parameters to be used for tagging S3 objectss3ObjectSummaries - the list of S3 objects to be taggedtag - the S3 object tagvoid tagVersions(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
S3FileTransferRequestParamsDto s3ObjectTaggerParamsDto,
List<com.amazonaws.services.s3.model.S3VersionSummary> s3VersionSummaries,
com.amazonaws.services.s3.model.Tag tag)
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. This set of parameters contains the S3 bucket names3ObjectTaggerParamsDto - the S3 file transfer request parameters to be used for tagging S3 objectss3VersionSummaries - the list of S3 versions to be taggedtag - the S3 object tagS3FileTransferResultsDto uploadDirectory(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws InterruptedException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix are for the target of the copy. The
local path is the local file to be copied.InterruptedException - if any problems were encountered.S3FileTransferResultsDto uploadFile(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws InterruptedException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix are for the target of the copy. The
local path is the local file to be copied.InterruptedException - if any problems were encountered.S3FileTransferResultsDto uploadFileList(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws InterruptedException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name, S3 key prefix, and the file list (files) are for the
target of the copy. The local path and the file list (files) are the local files to be copied. The keys of the files are calculated relative to the
common parent directory (local path) and the S3 key prefix.InterruptedException - if any problems were encountered.void validateGlacierS3FilesRestored(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto)
throws RuntimeException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and the file list identify the S3 objects to be
validatedRuntimeException - if file validation failsvoid validateS3File(S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto,
Long fileSizeInBytes)
throws RuntimeException
s3FileTransferRequestParamsDto - the S3 file transfer request parameters. The S3 bucket name and S3 key prefix identify the S3 file.fileSizeInBytes - the expected file size in bytesRuntimeException - if file validation failsCopyright © 2019. All rights reserved.