public static class XmlResponsesSaxParser.CopyObjectResultHandler extends org.xml.sax.helpers.DefaultHandler implements ObjectExpirationResult, S3RequesterChargedResult, S3VersionResult
Constructor and Description |
---|
CopyObjectResultHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
atTopLevel() |
void |
characters(char[] ch,
int start,
int length) |
protected void |
doEndElement(String uri,
String name,
String qName) |
protected void |
doStartElement(String uri,
String name,
String qName,
Attributes attrs) |
void |
endElement(String uri,
String name,
String qName) |
String |
getErrorCode() |
String |
getErrorHostId() |
String |
getErrorMessage() |
String |
getErrorRequestId() |
String |
getETag() |
Date |
getExpirationTime()
Returns the expiration date of the object, or null if the object is not
configured to expire.
|
String |
getExpirationTimeRuleId()
Returns the bucket lifecycle configuration rule ID for the expiration of
this object.
|
Date |
getLastModified() |
String |
getSSEAlgorithm()
Returns the server-side encryption algorithm if the object is encrypted
using AWS-managed keys.
|
String |
getSSECustomerAlgorithm()
Returns the server-side encryption algorithm if the object is encrypted
using customer-provided keys.
|
String |
getSSECustomerKeyMd5()
Returns the base64-encoded MD5 digest of the encryption key for
server-side encryption, if the object is encrypted using
customer-provided keys.
|
protected String |
getText() |
String |
getVersionId()
Gets the version ID of the newly copied object.
|
protected boolean |
in(String... path) |
boolean |
isErrorResponse() |
boolean |
isRequesterCharged()
Returns true if the user has enabled Requester Pays option when
conducting this operation from Requester Pays Bucket; else false.
|
void |
setExpirationTime(Date expirationTime)
Sets the expiration date of the object.
|
void |
setExpirationTimeRuleId(String expirationTimeRuleId)
Sets the bucket lifecycle configuration rule ID for the expiration of
this object.
|
void |
setRequesterCharged(boolean isRequesterCharged)
Used for conducting this operation from a Requester Pays Bucket.
|
void |
setSSEAlgorithm(String serverSideEncryption)
Sets the server-side encryption algorithm for the response.
|
void |
setSSECustomerAlgorithm(String algorithm)
Sets the server-side encryption algorithm used when encrypting the object
with customer-provided keys.
|
void |
setSSECustomerKeyMd5(String md5Digest)
Sets the base64-encoded MD5 digest of the encryption key for server-side
encryption.
|
void |
setVersionId(String versionId)
Sets the version ID of the newly copied object.
|
protected ServerSideEncryptionResult |
sseResult()
Used to get access to the specific server side encryption (SSE) result
from the subclass.
|
void |
startElement(String uri,
String name,
String qName,
Attributes attrs) |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
protected ServerSideEncryptionResult sseResult()
public Date getLastModified()
public String getVersionId()
S3VersionResult
getVersionId
in interface S3VersionResult
CopyObjectResult.setVersionId(String)
,
CompleteMultipartUploadResult.getVersionId()
,
PutObjectResult.getVersionId()
public void setVersionId(String versionId)
S3VersionResult
setVersionId
in interface S3VersionResult
versionId
- The version ID of the newly copied object.CopyObjectResult.getVersionId()
,
CompleteMultipartUploadResult.getVersionId()
,
PutObjectResult.getVersionId()
public Date getExpirationTime()
ObjectExpirationResult
getExpirationTime
in interface ObjectExpirationResult
public void setExpirationTime(Date expirationTime)
ObjectExpirationResult
setExpirationTime
in interface ObjectExpirationResult
expirationTime
- The date the object will expire.public String getExpirationTimeRuleId()
ObjectExpirationResult
getExpirationTimeRuleId
in interface ObjectExpirationResult
BucketLifecycleConfiguration.Rule.getId()
public void setExpirationTimeRuleId(String expirationTimeRuleId)
ObjectExpirationResult
setExpirationTimeRuleId
in interface ObjectExpirationResult
expirationTimeRuleId
- The rule ID of this object's expiration configurationpublic String getETag()
public String getErrorCode()
public String getErrorHostId()
public String getErrorMessage()
public String getErrorRequestId()
public boolean isErrorResponse()
public boolean isRequesterCharged()
S3RequesterChargedResult
If a bucket is enabled for Requester Pays, then any attempt of operation from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
Enabling Requester Pays disables the ability to have anonymous access to this bucket
isRequesterCharged
in interface S3RequesterChargedResult
public void setRequesterCharged(boolean isRequesterCharged)
S3RequesterChargedResult
If a bucket is enabled for Requester Pays, then any attempt of operation from it without Requester Pays enabled will result in a 403 error and the bucket owner will be charged for the request.
setRequesterCharged
in interface S3RequesterChargedResult
isRequesterCharged
- Indicates requester is charged for this operation.protected void doStartElement(String uri, String name, String qName, Attributes attrs)
public final String getSSEAlgorithm()
ServerSideEncryptionResult
getSSEAlgorithm
in interface ServerSideEncryptionResult
public final void setSSEAlgorithm(String serverSideEncryption)
ServerSideEncryptionResult
setSSEAlgorithm
in interface ServerSideEncryptionResult
serverSideEncryption
- The server-side encryption algorithm for the response.public final String getSSECustomerAlgorithm()
ServerSideEncryptionResult
getSSECustomerAlgorithm
in interface ServerSideEncryptionResult
public final void setSSECustomerAlgorithm(String algorithm)
ServerSideEncryptionResult
setSSECustomerAlgorithm
in interface ServerSideEncryptionResult
algorithm
- The server-side encryption algorithm used when encrypting the
object with customer-provided keys.public final String getSSECustomerKeyMd5()
ServerSideEncryptionResult
getSSECustomerKeyMd5
in interface ServerSideEncryptionResult
public final void setSSECustomerKeyMd5(String md5Digest)
ServerSideEncryptionResult
setSSECustomerKeyMd5
in interface ServerSideEncryptionResult
md5Digest
- The base64-encoded MD5 digest of the encryption key for
server-side encryption.public final void startElement(String uri, String name, String qName, Attributes attrs)
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
public final void endElement(String uri, String name, String qName)
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
public final void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
protected final String getText()
protected final boolean atTopLevel()
protected final boolean in(String... path)
path
- Path to testCopyright © 2017. All rights reserved.