Package com.adaptris.aws.s3
Class ExtendedCopyOperation
- java.lang.Object
-
- com.adaptris.aws.s3.S3OperationImpl
-
- com.adaptris.aws.s3.ObjectOperationImpl
-
- com.adaptris.aws.s3.CopyOperationImpl
-
- com.adaptris.aws.s3.ExtendedCopyOperation
-
- All Implemented Interfaces:
S3Operation
,ComponentLifecycleExtension
@ComponentProfile(summary="Copy an object in S3 to another Object", since="3.10.2") public class ExtendedCopyOperation extends CopyOperationImpl
Copy an object from S3 to another objectBy 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 theobject-metadata
andobject-tags
members as required. If you're using the Amazon S3 API against a different provider then your mileage may vary sinceobject-tags
andobject-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.
-
-
Field Summary
-
Fields inherited from class com.adaptris.aws.s3.S3OperationImpl
log
-
-
Constructor Summary
Constructors Constructor Description ExtendedCopyOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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(S3ObjectMetadata... meta)
ExtendedCopyOperation
withObjectMetadata(java.util.List<S3ObjectMetadata> meta)
ExtendedCopyOperation
withObjectTags(KeyValuePair... tags)
ExtendedCopyOperation
withObjectTags(KeyValuePairSet tags)
-
Methods inherited from class com.adaptris.aws.s3.CopyOperationImpl
execute, getDestinationBucket, getDestinationObjectName, setDestinationBucket, setDestinationObjectName, withDestinationBucket, withDestinationObjectName
-
Methods inherited from class com.adaptris.aws.s3.ObjectOperationImpl
getObjectName, s3ObjectKey, setObjectName, withObjectName
-
Methods inherited from class com.adaptris.aws.s3.S3OperationImpl
getBucket, resolve, s3Bucket, setBucket, withBucket
-
-
-
-
Method Detail
-
prepare
public void prepare() throws CoreException
- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Overrides:
prepare
in classObjectOperationImpl
- Throws:
CoreException
-
createCopyRequest
protected com.amazonaws.services.s3.model.CopyObjectRequest createCopyRequest(ClientWrapper wrapper, AdaptrisMessage msg) throws java.lang.Exception
- Specified by:
createCopyRequest
in classCopyOperationImpl
- Throws:
java.lang.Exception
-
withObjectMetadata
public ExtendedCopyOperation withObjectMetadata(java.util.List<S3ObjectMetadata> meta)
-
withObjectMetadata
public ExtendedCopyOperation withObjectMetadata(S3ObjectMetadata... meta)
-
withObjectTags
public ExtendedCopyOperation withObjectTags(KeyValuePairSet tags)
-
withObjectTags
public ExtendedCopyOperation withObjectTags(KeyValuePair... tags)
-
setObjectMetadata
public void setObjectMetadata(java.util.List<S3ObjectMetadata> objectMetadata)
Any specific object metadata that you want to force on the destination object.
-
getObjectMetadata
public java.util.List<S3ObjectMetadata> getObjectMetadata()
Any specific object metadata that you want to force on the destination object.
-
setObjectTags
public void setObjectTags(KeyValuePairSet objectTags)
Any specific object tags that you want to force on the destination object.
-
getObjectTags
public KeyValuePairSet getObjectTags()
Any specific object tags that you want to force on the destination object.
-
-