@ComponentProfile(summary="Copy an object in S3 to another Object", since="3.10.2") public class ExtendedCopyOperation extends CopyOperationImpl
By default this operation gets the existing ObjectMetadata and Tags associated with the S3
object, and ensures that they are applied to the underlying CopyObjectRequest
. You also
have the option to force various settings using the object-metadata
and
object-tags
members as required. If you're using the Amazon S3 API against a different
provider then your mileage may vary since object-tags
and object-metadata
might
not translate to alternate providers.
In the adapter configuration file this class is aliased as amazon-s3-extended-copy which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
ExtendedCopyOperation() |
Modifier and Type | Method and Description |
---|---|
protected com.amazonaws.services.s3.model.CopyObjectRequest |
createCopyRequest(ClientWrapper wrapper,
AdaptrisMessage msg) |
java.util.List<S3ObjectMetadata> |
getObjectMetadata()
Any specific object metadata that you want to force on the destination object.
|
KeyValuePairSet |
getObjectTags()
Any specific object tags that you want to force on the destination object.
|
void |
prepare() |
void |
setObjectMetadata(java.util.List<S3ObjectMetadata> objectMetadata)
Any specific object metadata that you want to force on the destination object.
|
void |
setObjectTags(KeyValuePairSet objectTags)
Any specific object tags that you want to force on the destination object.
|
ExtendedCopyOperation |
withObjectMetadata(java.util.List<S3ObjectMetadata> meta) |
ExtendedCopyOperation |
withObjectMetadata(S3ObjectMetadata... meta) |
ExtendedCopyOperation |
withObjectTags(KeyValuePair... tags) |
ExtendedCopyOperation |
withObjectTags(KeyValuePairSet tags) |
execute, getDestinationBucket, getDestinationObjectName, setDestinationBucket, setDestinationObjectName, withDestinationBucket, withDestinationObjectName
getObjectName, s3ObjectKey, setObjectName, withObjectName
getBucket, getBucketName, getKey, mustHaveEither, resolve, s3Bucket, setBucket, setBucketName, setKey, withBucket, withBucketName, withKey
public void prepare() throws CoreException
prepare
in interface ComponentLifecycleExtension
prepare
in class ObjectOperationImpl
CoreException
protected com.amazonaws.services.s3.model.CopyObjectRequest createCopyRequest(ClientWrapper wrapper, AdaptrisMessage msg) throws java.lang.Exception
createCopyRequest
in class CopyOperationImpl
java.lang.Exception
public ExtendedCopyOperation withObjectMetadata(java.util.List<S3ObjectMetadata> meta)
public ExtendedCopyOperation withObjectMetadata(S3ObjectMetadata... meta)
public ExtendedCopyOperation withObjectTags(KeyValuePairSet tags)
public ExtendedCopyOperation withObjectTags(KeyValuePair... tags)
public void setObjectMetadata(java.util.List<S3ObjectMetadata> objectMetadata)
public java.util.List<S3ObjectMetadata> getObjectMetadata()
public void setObjectTags(KeyValuePairSet objectTags)
public KeyValuePairSet getObjectTags()