Example usage for com.amazonaws.services.s3.model ObjectMetadata getRestoreExpirationTime

List of usage examples for com.amazonaws.services.s3.model ObjectMetadata getRestoreExpirationTime

Introduction

In this page you can find the example usage for com.amazonaws.services.s3.model ObjectMetadata getRestoreExpirationTime.

Prototype

public Date getRestoreExpirationTime() 

Source Link

Document

Returns the time at which an object that has been temporarily restored from Amazon Glacier will expire, and will need to be restored again in order to be accessed.

Usage

From source file:org.xmlsh.aws.util.AWSS3Command.java

License:BSD License

protected void writeMeta(ObjectMetadata m)
        throws InvalidArgumentException, XMLStreamException, SaxonApiException {

    mLogger.entry(m);/*w w  w. j a  v  a2  s.co  m*/
    startElement(sMetaDataElem);

    attribute("cache-control", m.getCacheControl());
    attribute("content-disposition", m.getContentDisposition());
    attribute("content-encoding", m.getContentEncoding());
    attribute("md5", m.getContentMD5());
    attribute("etag", m.getETag());
    attribute("version-id", m.getVersionId());
    attribute("content-length", String.valueOf(m.getContentLength()));
    attribute("last-modified", Util.formatXSDateTime(m.getLastModified()));
    attribute("expiration-time", Util.formatXSDateTime(m.getExpirationTime()));
    attribute("expiration-time-rule-id", m.getExpirationTimeRuleId());
    attribute("httpExpiresDate", Util.formatXSDateTime(m.getHttpExpiresDate()));
    attribute("ongoingRestore", m.getOngoingRestore());
    attribute("restore-expiration-time", Util.formatXSDateTime(m.getRestoreExpirationTime()));
    attribute("instance-length", m.getInstanceLength());
    attribute("sse-algorithm", m.getSSEAlgorithm());
    attribute("sse-aws-kms-key-id", m.getSSEAwsKmsKeyId());
    attribute("sse-customer-algorithm", m.getSSECustomerAlgorithm());
    attribute("sse-customer-key-md5", m.getSSECustomerKeyMd5());
    attribute("storage-class", m.getStorageClass());

    startElement("user-metadata");
    for (Entry<String, String> user : m.getUserMetadata().entrySet()) {
        startElement(sUserMetaDataElem);
        attribute("name", user.getKey());
        attribute("value", user.getValue());
        endElement();

    }
    endElement();
    endElement();

    mLogger.exit();
}