public class S3OperationsImpl extends Object implements S3Operations
ERROR_CODE_ACCESS_DENIED, ERROR_CODE_INTERNAL_ERROR, ERROR_CODE_NO_SUCH_BUCKET, ERROR_CODE_NO_SUCH_KEY| Constructor and Description |
|---|
S3OperationsImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
abortMultipartUpload(com.amazonaws.services.s3.model.AbortMultipartUploadRequest abortMultipartUploadRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Aborts a multipart upload.
|
com.amazonaws.services.s3.transfer.Copy |
copyFile(com.amazonaws.services.s3.model.CopyObjectRequest copyObjectRequest,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
Schedules a new transfer to copy data from one Amazon S3 location to another Amazon S3 location.
|
com.amazonaws.services.s3.model.DeleteObjectsResult |
deleteObjects(com.amazonaws.services.s3.model.DeleteObjectsRequest deleteObjectsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Deletes the specified S3 objects in the specified S3 bucket.
|
com.amazonaws.services.s3.transfer.Download |
download(String s3BucketName,
String s3Key,
File file,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
Schedules a new transfer to download data from Amazon S3 and save it to the specified file.
|
com.amazonaws.services.s3.transfer.MultipleFileDownload |
downloadDirectory(String s3BucketName,
String s3KeyPrefix,
File destinationDirectory,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
Downloads all objects in the virtual directory designated by the key prefix given to the destination directory given.
|
URL |
generatePresignedUrl(com.amazonaws.services.s3.model.GeneratePresignedUrlRequest generatePresignedUrlRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Returns a pre-signed URL for accessing an Amazon S3 resource.
|
com.amazonaws.services.s3.model.ObjectMetadata |
getObjectMetadata(String s3BucketName,
String s3Key,
com.amazonaws.services.s3.AmazonS3 s3Client)
Gets the metadata for the specified Amazon S3 object without actually fetching the object itself.
|
com.amazonaws.services.s3.model.GetObjectTaggingResult |
getObjectTagging(com.amazonaws.services.s3.model.GetObjectTaggingRequest getObjectTaggingRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Returns all S3 object tags for the specified object.
|
com.amazonaws.services.s3.model.S3Object |
getS3Object(com.amazonaws.services.s3.model.GetObjectRequest getObjectRequest,
com.amazonaws.services.s3.AmazonS3 s3)
Gets the object stored in Amazon S3 under the specified bucket and key.
|
com.amazonaws.services.s3.model.MultipartUploadListing |
listMultipartUploads(com.amazonaws.services.s3.model.ListMultipartUploadsRequest listMultipartUploadsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Lists in-progress multipart uploads.
|
com.amazonaws.services.s3.model.ObjectListing |
listObjects(com.amazonaws.services.s3.model.ListObjectsRequest listObjectsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Returns a list of summary information about the objects in the specified bucket.
|
com.amazonaws.services.s3.model.VersionListing |
listVersions(com.amazonaws.services.s3.model.ListVersionsRequest listVersionsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Returns a list of summary information about the versions in the specified bucket.
|
com.amazonaws.services.s3.model.PutObjectResult |
putObject(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Uploads a new object to the specified Amazon S3 bucket.
|
void |
restoreObject(com.amazonaws.services.s3.model.RestoreObjectRequest requestRestore,
com.amazonaws.services.s3.AmazonS3 s3Client)
Requests to restore an object, which was transitioned to Amazon Glacier from Amazon S3 when it was expired, into Amazon S3 again.
|
void |
rollback()
Rolls back any updates to S3 within a given session.
|
com.amazonaws.services.s3.model.SetObjectTaggingResult |
setObjectTagging(com.amazonaws.services.s3.model.SetObjectTaggingRequest setObjectTaggingRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
Set the tags for the specified object.
|
com.amazonaws.services.s3.transfer.Upload |
upload(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
Schedules a new transfer to upload data to Amazon S3.
|
com.amazonaws.services.s3.transfer.MultipleFileUpload |
uploadDirectory(String s3BucketName,
String virtualDirectoryKeyPrefix,
File directory,
boolean includeSubdirectories,
com.amazonaws.services.s3.transfer.ObjectMetadataProvider metadataProvider,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
Uploads all files in the directory given to the bucket named, optionally recursing for all subdirectories.
|
com.amazonaws.services.s3.transfer.MultipleFileUpload |
uploadFileList(String s3BucketName,
String virtualDirectoryKeyPrefix,
File directory,
List<File> files,
com.amazonaws.services.s3.transfer.ObjectMetadataProvider metadataProvider,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
Uploads all specified files to the bucket named, constructing relative keys depending on the common parent directory given.
|
public void abortMultipartUpload(com.amazonaws.services.s3.model.AbortMultipartUploadRequest abortMultipartUploadRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsabortMultipartUpload in interface S3OperationsabortMultipartUploadRequest - the request object containing all the parameters for the operations3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.transfer.Copy copyFile(com.amazonaws.services.s3.model.CopyObjectRequest copyObjectRequest,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
S3OperationscopyFile in interface S3OperationscopyObjectRequest - the request containing all the parameters for the copytransferManager - the transfer manager implementation to usepublic com.amazonaws.services.s3.model.DeleteObjectsResult deleteObjects(com.amazonaws.services.s3.model.DeleteObjectsRequest deleteObjectsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsdeleteObjects in interface S3OperationsdeleteObjectsRequest - the request object containing all the options for deleting multiple objects in a specified buckets3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.transfer.Download download(String s3BucketName, String s3Key, File file, com.amazonaws.services.s3.transfer.TransferManager transferManager)
S3Operationsdownload in interface S3Operationss3BucketName - the S3 bucket names3Key - the S3 keyfile - the destination filetransferManager - the transfer manager implementation to usepublic com.amazonaws.services.s3.transfer.MultipleFileDownload downloadDirectory(String s3BucketName, String s3KeyPrefix, File destinationDirectory, com.amazonaws.services.s3.transfer.TransferManager transferManager)
S3OperationsdownloadDirectory in interface S3Operationss3BucketName - the S3 bucket names3KeyPrefix - the S3 key prefixdestinationDirectory - the destination directorytransferManager - the transfer manager implementation to usepublic URL generatePresignedUrl(com.amazonaws.services.s3.model.GeneratePresignedUrlRequest generatePresignedUrlRequest, com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsgeneratePresignedUrl in interface S3OperationsgeneratePresignedUrlRequest - the request object containing all the options for generating a pre-signed URL (bucket name, key, expiration date,
etc)s3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.ObjectMetadata getObjectMetadata(String s3BucketName, String s3Key, com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsgetObjectMetadata in interface S3Operationss3BucketName - the S3 bucket names3Key - the S3 keys3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.GetObjectTaggingResult getObjectTagging(com.amazonaws.services.s3.model.GetObjectTaggingRequest getObjectTaggingRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsgetObjectTagging in interface S3OperationsgetObjectTaggingRequest - the request object containing all the options on how to retrieve the Amazon S3 object tagss3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.S3Object getS3Object(com.amazonaws.services.s3.model.GetObjectRequest getObjectRequest,
com.amazonaws.services.s3.AmazonS3 s3)
S3OperationsgetS3Object in interface S3OperationsgetObjectRequest - the request object containing all the options for downloading an Amazon S3 objects3 - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.MultipartUploadListing listMultipartUploads(com.amazonaws.services.s3.model.ListMultipartUploadsRequest listMultipartUploadsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationslistMultipartUploads in interface S3OperationslistMultipartUploadsRequest - the request object that specifies all the parameters of this operations3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.ObjectListing listObjects(com.amazonaws.services.s3.model.ListObjectsRequest listObjectsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationslistObjects in interface S3OperationslistObjectsRequest - the request object containing all options for listing the objects in a specified buckets3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.VersionListing listVersions(com.amazonaws.services.s3.model.ListVersionsRequest listVersionsRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationslistVersions in interface S3OperationslistVersionsRequest - the request object containing all options for listing the versions in a specified buckets3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.model.PutObjectResult putObject(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsputObject in interface S3OperationsputObjectRequest - the request object containing all the parameters to upload a new object to Amazon S3s3Client - the AmazonS3 implementation to usepublic void restoreObject(com.amazonaws.services.s3.model.RestoreObjectRequest requestRestore,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationsrestoreObject in interface S3OperationsrequestRestore - the request object containing all the options for restoring an objects3Client - the AmazonS3 implementation to usepublic void rollback()
S3Operationsrollback in interface S3Operationspublic com.amazonaws.services.s3.model.SetObjectTaggingResult setObjectTagging(com.amazonaws.services.s3.model.SetObjectTaggingRequest setObjectTaggingRequest,
com.amazonaws.services.s3.AmazonS3 s3Client)
S3OperationssetObjectTagging in interface S3OperationssetObjectTaggingRequest - the request object containing all the options for setting the tags for the specified objects3Client - the AmazonS3 implementation to usepublic com.amazonaws.services.s3.transfer.Upload upload(com.amazonaws.services.s3.model.PutObjectRequest putObjectRequest,
com.amazonaws.services.s3.transfer.TransferManager transferManager)
S3Operationsupload in interface S3OperationsputObjectRequest - the request containing all the parameters for the uploadtransferManager - the transfer manager implementation to usepublic com.amazonaws.services.s3.transfer.MultipleFileUpload uploadDirectory(String s3BucketName, String virtualDirectoryKeyPrefix, File directory, boolean includeSubdirectories, com.amazonaws.services.s3.transfer.ObjectMetadataProvider metadataProvider, com.amazonaws.services.s3.transfer.TransferManager transferManager)
S3OperationsuploadDirectory in interface S3Operationss3BucketName - the S3 bucket namevirtualDirectoryKeyPrefix - the key prefix of the virtual directory to upload todirectory - the directory to uploadincludeSubdirectories - specified whether to include subdirectories in the upload. If true, files found in subdirectories will be included with an
appropriate concatenation to the key prefixmetadataProvider - the callback of type ObjectMetadataProvider which is used to provide metadata for each file being uploadedtransferManager - the transfer manager implementation to usepublic com.amazonaws.services.s3.transfer.MultipleFileUpload uploadFileList(String s3BucketName, String virtualDirectoryKeyPrefix, File directory, List<File> files, com.amazonaws.services.s3.transfer.ObjectMetadataProvider metadataProvider, com.amazonaws.services.s3.transfer.TransferManager transferManager)
S3OperationsuploadFileList in interface S3Operationss3BucketName - the S3 bucket namevirtualDirectoryKeyPrefix - the key prefix of the virtual directory to upload todirectory - the common parent directory of files to upload. The keys of the files in the list of files are constructed relative to this directory
and the virtualDirectoryKeyPrefixfiles - the list of files to upload. The keys of the files are calculated relative to the common parent directory and the virtualDirectoryKeyPrefixmetadataProvider - the callback of type ObjectMetadataProvider which is used to provide metadata for each file being uploadedtransferManager - the transfer manager implementation to useCopyright © 2019. All rights reserved.