protected InitiateMultipartUploadRequest newInitiateMultipartUploadRequest( UploadObjectRequest req) { return new EncryptedInitiateMultipartUploadRequest( req.getBucketName(), req.getKey(), req.getMetadata()) .withMaterialsDescription(req.getMaterialsDescription()) .withRedirectLocation(req.getRedirectLocation()) .withSSEAwsKeyManagementParams(req.getSSEAwsKeyManagementParams()) .withSSECustomerKey(req.getSSECustomerKey()) .withStorageClass(req.getStorageClass()) .withAccessControlList(req.getAccessControlList()) .withCannedACL(req.getCannedAcl()) .withGeneralProgressListener(req.getGeneralProgressListener()) .withRequestMetricCollector(req.getRequestMetricCollector()) ; }
/** * Creates and returns a multi-part upload initiation request from the given upload-object * request. */ protected final InitiateMultipartUploadRequest newInitiateMultipartUploadRequest( UploadObjectRequest req) { return new InitiateMultipartUploadRequest( req.getBucketName(), req.getKey(), req.getMetadata()) .withRedirectLocation(req.getRedirectLocation()) .withSSEAwsKeyManagementParams(req.getSSEAwsKeyManagementParams()) .withSSECustomerKey(req.getSSECustomerKey()) .withStorageClass(req.getStorageClass()) .withAccessControlList(req.getAccessControlList()) .withCannedACL(req.getCannedAcl()) .withGeneralProgressListener(req.getGeneralProgressListener()) .withRequestMetricCollector(req.getRequestMetricCollector()) ; }
.withRequesterPays(origReq.isRequesterPays()) .withAccessControlList(origReq.getAccessControlList()) .withStorageClass(origReq.getStorageClass()) .withSSECustomerKey(origReq.getDestinationSSECustomerKey()) .withSSEAwsKeyManagementParams(origReq.getSSEAwsKeyManagementParams())
.withStorageClass(origReq.getStorageClass()) .withRedirectLocation(origReq.getRedirectLocation()) .withSSECustomerKey(origReq.getSSECustomerKey())
@SuppressWarnings("checkstyle:hiddenfield") protected InitiateMultipartUploadRequest newInitiateMultipartUploadRequest( UploadObjectRequest req) { return new EncryptedInitiateMultipartUploadRequest( req.getBucketName(), req.getKey(), req.getMetadata()) .withMaterialsDescription(req.getMaterialsDescription()) .withRedirectLocation(req.getRedirectLocation()) .withSSEAwsKeyManagementParams(req.getSSEAwsKeyManagementParams()) .withSSECustomerKey(req.getSSECustomerKey()) .withStorageClass(req.getStorageClass()) .withAccessControlList(req.getAccessControlList()) .withCannedACL(req.getCannedAcl()) .withGeneralProgressListener(req.getGeneralProgressListener()) .withRequestMetricCollector(req.getRequestMetricCollector()); }
.withStorageClass(options.getS3StorageClass()) .withObjectMetadata(objectMetadata); request.setSSECustomerKey(options.getSSECustomerKey());
@SuppressWarnings("checkstyle:hiddenfield") protected InitiateMultipartUploadRequest newInitiateMultipartUploadRequest( UploadObjectRequest req) { return new EncryptedInitiateMultipartUploadRequest( req.getBucketName(), req.getKey(), req.getMetadata()) .withMaterialsDescription(req.getMaterialsDescription()) .withRedirectLocation(req.getRedirectLocation()) .withSSEAwsKeyManagementParams(req.getSSEAwsKeyManagementParams()) .withSSECustomerKey(req.getSSECustomerKey()) .withStorageClass(req.getStorageClass()) .withAccessControlList(req.getAccessControlList()) .withCannedACL(req.getCannedAcl()) .withGeneralProgressListener(req.getGeneralProgressListener()) .withRequestMetricCollector(req.getRequestMetricCollector()); }
protected InitiateMultipartUploadRequest newInitiateMultipartUploadRequest( UploadObjectRequest req) { return new EncryptedInitiateMultipartUploadRequest( req.getBucketName(), req.getKey(), req.getMetadata()) .withMaterialsDescription(req.getMaterialsDescription()) .withRedirectLocation(req.getRedirectLocation()) .withSSEAwsKeyManagementParams(req.getSSEAwsKeyManagementParams()) .withSSECustomerKey(req.getSSECustomerKey()) .withStorageClass(req.getStorageClass()) .withAccessControlList(req.getAccessControlList()) .withCannedACL(req.getCannedAcl()) .withGeneralProgressListener(req.getGeneralProgressListener()) .withRequestMetricCollector(req.getRequestMetricCollector()) ; }
/** * Creates and returns a multi-part upload initiation request from the given upload-object * request. */ protected final InitiateMultipartUploadRequest newInitiateMultipartUploadRequest( UploadObjectRequest req) { return new InitiateMultipartUploadRequest( req.getBucketName(), req.getKey(), req.getMetadata()) .withRedirectLocation(req.getRedirectLocation()) .withSSEAwsKeyManagementParams(req.getSSEAwsKeyManagementParams()) .withSSECustomerKey(req.getSSECustomerKey()) .withStorageClass(req.getStorageClass()) .withAccessControlList(req.getAccessControlList()) .withCannedACL(req.getCannedAcl()) .withGeneralProgressListener(req.getGeneralProgressListener()) .withRequestMetricCollector(req.getRequestMetricCollector()) ; }
/** * Initiates a multipart upload and returns the upload id */ private String initiateMultipartUpload(CopyObjectRequest origReq) { EncryptedInitiateMultipartUploadRequest req = new EncryptedInitiateMultipartUploadRequest( origReq.getDestinationBucketName(), origReq.getDestinationKey()).withCannedACL( origReq.getCannedAccessControlList()) .withRequesterPays(origReq.isRequesterPays()) .withAccessControlList(origReq.getAccessControlList()) .withStorageClass(origReq.getStorageClass()) .withSSECustomerKey(origReq.getDestinationSSECustomerKey()) .withSSEAwsKeyManagementParams(origReq.getSSEAwsKeyManagementParams()) .withGeneralProgressListener(origReq.getGeneralProgressListener()) .withRequestMetricCollector(origReq.getRequestMetricCollector()) ; req.setCreateEncryptionMaterial(false); ObjectMetadata newObjectMetadata = origReq.getNewObjectMetadata(); if (newObjectMetadata == null){ newObjectMetadata = new ObjectMetadata(); } if (newObjectMetadata.getContentType() == null){ newObjectMetadata.setContentType(metadata.getContentType()); } req.setObjectMetadata(newObjectMetadata); populateMetadataWithEncryptionParams(metadata,newObjectMetadata); String uploadId = s3.initiateMultipartUpload(req).getUploadId(); log.debug("Initiated new multipart upload: " + uploadId); return uploadId; }
InitiateMultipartUploadRequest initiateUploadRequest = new InitiateMultipartUploadRequest(destinationPath.getBucket(), destinationPath.getKey()) .withStorageClass(options.getS3StorageClass()) .withObjectMetadata(sourceObjectMetadata); initiateUploadRequest.setSSECustomerKey(options.getSSECustomerKey());
.withStorageClass(origReq.getStorageClass()) .withRedirectLocation(origReq.getRedirectLocation()) .withSSECustomerKey(origReq.getSSECustomerKey())