@ComponentProfile(summary="Copy an object in S3 to another Object") public class CopyOperation extends CopyOperationImpl
Effectively uses AmazonS3Client.copyObject(String, String, String, String)
using only the
default behaviour. Note that by default the server-side-encryption, storage-class
and
website-redirect-location
are not copied to the destination object. If you need those
settings then you should probably think about using ExtendedCopyOperation
instead.
In the adapter configuration file this class is aliased as amazon-s3-copy which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
CopyOperation() |
Modifier and Type | Method and Description |
---|---|
protected com.amazonaws.services.s3.model.CopyObjectRequest |
createCopyRequest(ClientWrapper wrapper,
AdaptrisMessage msg) |
DataInputParameter<java.lang.String> |
getDestinationBucketName()
Deprecated.
|
DataInputParameter<java.lang.String> |
getDestinationKey()
Deprecated.
|
void |
prepare() |
void |
setDestinationBucketName(DataInputParameter<java.lang.String> destinationBucketName)
Deprecated.
|
void |
setDestinationKey(DataInputParameter<java.lang.String> destinationKey)
Deprecated.
|
CopyOperation |
withDestinationBucketName(DataInputParameter<java.lang.String> bucket)
Deprecated.
|
CopyOperation |
withDestinationKey(DataInputParameter<java.lang.String> key)
Deprecated.
|
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
@Deprecated public CopyOperation withDestinationBucketName(DataInputParameter<java.lang.String> bucket)
@Deprecated public CopyOperation withDestinationKey(DataInputParameter<java.lang.String> key)
@Deprecated public DataInputParameter<java.lang.String> getDestinationBucketName()
If not explictly configured, then we use the bucket name instead making the assumption it's a copy within the same bucket.
@Deprecated public void setDestinationBucketName(DataInputParameter<java.lang.String> destinationBucketName)
If not explictly configured, then we use the bucket name instead making the assumption it's a copy within the same bucket.
@Deprecated public DataInputParameter<java.lang.String> getDestinationKey()
@Deprecated public void setDestinationKey(DataInputParameter<java.lang.String> destinationKey)