@Override public CopyObjectRequest decorate(CopyObjectRequest request) { // Note: users might want to use a different key when they copy existing objects. This might additionally need to // manage key history or support updating keys at run time, either of which requires a huge refactoring. We simply // don't support changing keys for now. return request.withSourceSSECustomerKey(key) .withDestinationSSECustomerKey(key); } }
/** * Creates a #GetObjectMetadataRequest by copying values for common members * from the input #GetObjectRequest. */ public static GetObjectMetadataRequest createGetObjectMetadataRequestFrom(GetObjectRequest getObjectRequest) { return new GetObjectMetadataRequest(getObjectRequest.getBucketName(), getObjectRequest.getKey()) .withVersionId(getObjectRequest.getVersionId()) .withRequesterPays(getObjectRequest.isRequesterPays()) .withSSECustomerKey(getObjectRequest.getSSECustomerKey()) .withPartNumber(getObjectRequest.getPartNumber()); } }
.withSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey()) .withRequesterPays(copyObjectRequest.isRequesterPays()) .withVersionId(copyObjectRequest.getSourceVersionId());
@Override public CopyObjectRequest decorate(CopyObjectRequest request) { // Note: users might want to use a different key when they copy existing objects. This might additionally need to // manage key history or support updating keys at run time, either of which requires a huge refactoring. We simply // don't support changing keys for now. return request.withSourceSSECustomerKey(key) .withDestinationSSECustomerKey(key); } }
copyObjectRequest.getSourceBucketName(), copyObjectRequest.getSourceKey()) .withSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey());
/** * Creates a #GetObjectMetadataRequest by copying values for common members * from the input #GetObjectRequest. */ public static GetObjectMetadataRequest createGetObjectMetadataRequestFrom(GetObjectRequest getObjectRequest) { return new GetObjectMetadataRequest(getObjectRequest.getBucketName(), getObjectRequest.getKey()) .withVersionId(getObjectRequest.getVersionId()) .withRequesterPays(getObjectRequest.isRequesterPays()) .withSSECustomerKey(getObjectRequest.getSSECustomerKey()) .withPartNumber(getObjectRequest.getPartNumber()); } }
copyObjectRequest.getSourceBucketName(), copyObjectRequest.getSourceKey()) .withSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey());
.withSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey()) .withRequesterPays(copyObjectRequest.isRequesterPays()) .withVersionId(copyObjectRequest.getSourceVersionId());