/** * Sets the optional access control list for the new object. If specified, * cannedAcl will be ignored. Returns this {@link CopyObjectRequest}, * enabling additional method calls to be chained together. * * @param accessControlList * The access control list for the new object. */ public CopyObjectRequest withAccessControlList(AccessControlList accessControlList) { setAccessControlList(accessControlList); return this; }
/** * Sets the optional access control list for the new object. If specified, * cannedAcl will be ignored. Returns this {@link CopyObjectRequest}, * enabling additional method calls to be chained together. * * @param accessControlList The access control list for the new object. */ public CopyObjectRequest withAccessControlList(AccessControlList accessControlList) { setAccessControlList(accessControlList); return this; }
final CopyObjectRequest copyRequest = new CopyObjectRequest(s3Bucket, s3Path, targetS3Bucket, targetS3Path); if (!config.getDisableAcl()) { copyRequest.setAccessControlList(S3Utils.grantFullControlToBucketOwner(s3Client, targetS3Bucket));
/** * Sets the optional access control list for the new object. If specified, * cannedAcl will be ignored. Returns this {@link CopyObjectRequest}, * enabling additional method calls to be chained together. * * @param accessControlList * The access control list for the new object. */ public CopyObjectRequest withAccessControlList(AccessControlList accessControlList) { setAccessControlList(accessControlList); return this; }
/** * Sets the optional access control list for the new object. If specified, * cannedAcl will be ignored. Returns this {@link CopyObjectRequest}, * enabling additional method calls to be chained together. * * @param accessControlList The access control list for the new object. */ public CopyObjectRequest withAccessControlList(AccessControlList accessControlList) { setAccessControlList(accessControlList); return this; }
/** * Copy an object in a bucket to another name. Copies the original objects metadata and ACL. */ @Override public CopyObjectResult copyObject(String bucket, String srcKey, String dstKey) { checkNotBlank(bucket, "bucket"); checkNotBlank(srcKey, "srcKey"); checkNotBlank(dstKey, "dstKey"); checkArgument(!srcKey.equals(dstKey), "srcKey cannot be the same as dstKey -> [%s] == [%s]", srcKey, dstKey); CopyObjectRequest request = new CopyObjectRequest(bucket, srcKey, bucket, dstKey); request.setAccessControlList(client.getObjectAcl(bucket, srcKey)); return CopyObjectResult.copyOf(client.copyObject(request)); }
request.setCannedAccessControlList(CannedAccessControlList.BucketOwnerFullControl); } else { request.setAccessControlList(objectAcl);
final CopyObjectRequest copyRequest = new CopyObjectRequest(s3Bucket, s3Path, targetS3Bucket, targetS3Path); if (!config.getDisableAcl()) { copyRequest.setAccessControlList(S3Utils.grantFullControlToBucketOwner(s3Client, targetS3Bucket));