/** * Sets the canned ACL to use for the newly copied object, and returns this * <code>CopyObjectRequest</code>, enabling additional method calls to be chained * together. * * @param cannedACL * The canned ACL to set for the newly copied object. * * @return This <code>CopyObjectRequest</code>, enabling additional method calls to be * chained together. */ public CopyObjectRequest withCannedAccessControlList(CannedAccessControlList cannedACL) { setCannedAccessControlList(cannedACL); return this; }
/** * Sets the canned ACL to use for the newly copied object, and returns this * <code>CopyObjectRequest</code>, enabling additional method calls to be * chained together. * * @param cannedACL The canned ACL to set for the newly copied object. * @return This <code>CopyObjectRequest</code>, enabling additional method * calls to be chained together. */ public CopyObjectRequest withCannedAccessControlList(CannedAccessControlList cannedACL) { setCannedAccessControlList(cannedACL); return this; }
/** * Sets the canned ACL to use for the newly copied object, and returns this * <code>CopyObjectRequest</code>, enabling additional method calls to be * chained together. * * @param cannedACL The canned ACL to set for the newly copied object. * @return This <code>CopyObjectRequest</code>, enabling additional method * calls to be chained together. */ public CopyObjectRequest withCannedAccessControlList(CannedAccessControlList cannedACL) { setCannedAccessControlList(cannedACL); return this; }
/** * Sets the canned ACL to use for the newly copied object, and returns this * <code>CopyObjectRequest</code>, enabling additional method calls to be chained * together. * * @param cannedACL * The canned ACL to set for the newly copied object. * * @return This <code>CopyObjectRequest</code>, enabling additional method calls to be * chained together. */ public CopyObjectRequest withCannedAccessControlList(CannedAccessControlList cannedACL) { setCannedAccessControlList(cannedACL); return this; }
/** * Create a CopyObjectRequest with an ACL set to PublicRead */ public static CopyObjectRequest getCopyObjectRequest(String bucket, String src, String dst) { CopyObjectRequest request = new CopyObjectRequest(bucket, src, bucket, dst); request.setCannedAccessControlList(CloudFrontConstants.DEFAULT_ACL); return request; }
copyObjectRequest.setCannedAccessControlList(cannedACL); copyObjectRequest.setNewObjectMetadata(dstom);
request.setCannedAccessControlList(CannedAccessControlList.BucketOwnerFullControl); } else { request.setAccessControlList(objectAcl);
@Override public String copyContent(String sourceSpaceId, String sourceContentId, String destSpaceId, String destContentId) { log.debug("copyContent({}, {}, {}, {})", sourceSpaceId, sourceContentId, destSpaceId, destContentId); // Will throw if source bucket does not exist String sourceBucketName = getBucketName(sourceSpaceId); // Will throw if destination bucket does not exist String destBucketName = getBucketName(destSpaceId); throwIfContentNotExist(sourceBucketName, sourceContentId); CopyObjectRequest request = new CopyObjectRequest(sourceBucketName, sourceContentId, destBucketName, destContentId); request.setStorageClass(DEFAULT_STORAGE_CLASS); request.setCannedAccessControlList(CannedAccessControlList.Private); CopyObjectResult result = doCopyObject(request); return StorageProviderUtil.compareChecksum(this, sourceSpaceId, sourceContentId, result.getETag()); }
copyObjectRequest.setCannedAccessControlList(cannedACL); copyObjectRequest.setNewObjectMetadata(dstom);
new CopyObjectRequest(bucket, srcKey, bucket, dstKey); setOptionalCopyObjectRequestParameters(copyObjectRequest); copyObjectRequest.setCannedAccessControlList(cannedACL); copyObjectRequest.setNewObjectMetadata(dstom); Copy copy = transfers.copy(copyObjectRequest);