Package com.emc.object.s3
Class S3ObjectMetadata
- java.lang.Object
-
- com.emc.object.s3.S3ObjectMetadata
-
public class S3ObjectMetadata extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXPIRY_DATE
static java.lang.String
RULE_ID
-
Constructor Summary
Constructors Constructor Description S3ObjectMetadata()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description S3ObjectMetadata
addEncodedUserMetadata(java.lang.String name, java.lang.String value)
S3ObjectMetadata
addUserMetadata(java.lang.String name, java.lang.String value)
static <T> S3ObjectMetadata
fromHeaders(java.util.Map<java.lang.String,java.util.List<T>> headers)
java.lang.String
getCacheControl()
java.lang.String
getContentDisposition()
java.lang.String
getContentEncoding()
java.lang.Long
getContentLength()
java.lang.String
getContentMd5()
java.lang.String
getContentType()
java.lang.String
getDecodedUserMetadata(java.lang.String name)
java.lang.String
getETag()
java.util.Date
getExpirationDate()
static <T> java.util.Date
getExpirationDate(java.util.Map<java.lang.String,java.util.List<T>> headers)
java.lang.String
getExpirationRuleId()
static <T> java.lang.String
getExpirationRuleId(java.util.Map<java.lang.String,java.util.List<T>> headers)
static java.lang.String
getHeaderName(java.lang.String userMetadataKey)
java.util.Date
getHttpExpires()
java.util.Date
getLastModified()
ObjectLockLegalHold
getObjectLockLegalHold()
protected static <T> ObjectLockLegalHold
getObjectLockLegalHold(java.util.Map<java.lang.String,java.util.List<T>> headers)
ObjectLockRetention
getObjectLockRetention()
protected static <T> ObjectLockRetention
getObjectLockRetention(java.util.Map<java.lang.String,java.util.List<T>> headers)
java.lang.Long
getRetentionPeriod()
java.lang.String
getRetentionPolicy()
SseAlgorithm
getServerSideEncryption()
int
getTaggingCount()
static java.util.Map<java.lang.String,java.util.List<java.lang.Object>>
getUmdHeaders(java.util.Map<java.lang.String,java.lang.String> userMetadata)
java.util.Map<java.lang.String,java.lang.String>
getUserMetadata()
java.lang.String
getUserMetadata(java.lang.String name)
static <T> java.util.Map<java.lang.String,java.lang.String>
getUserMetadata(java.util.Map<java.lang.String,java.util.List<T>> headers)
protected static java.lang.String
getUserMetadataKey(java.lang.String headerName)
java.lang.String
getVersionId()
void
setCacheControl(java.lang.String cacheControl)
void
setContentDisposition(java.lang.String contentDisposition)
void
setContentEncoding(java.lang.String contentEncoding)
void
setContentLength(java.lang.Long contentLength)
void
setContentMd5(java.lang.String contentMd5)
void
setContentType(java.lang.String contentType)
void
setETag(java.lang.String eTag)
void
setExpirationDate(java.util.Date expirationDate)
void
setExpirationRuleId(java.lang.String expirationRuleId)
void
setHttpExpires(java.util.Date httpExpires)
void
setLastModified(java.util.Date lastModified)
void
setObjectLockLegalHold(ObjectLockLegalHold objectLockLegalHold)
void
setObjectLockRetention(ObjectLockRetention objectLockRetention)
void
setRetentionPeriod(java.lang.Long retentionPeriod)
void
setRetentionPolicy(java.lang.String retentionPolicy)
void
setServerSideEncryption(SseAlgorithm serverSideEncryption)
void
setTaggingCount(int taggingCount)
void
setUserMetadata(java.util.Map<java.lang.String,java.lang.String> userMetadata)
Stores a copy of the map to prevent internal alterations (i.e.void
setVersionId(java.lang.String versionId)
java.util.Map<java.lang.String,java.util.List<java.lang.Object>>
toHeaders()
S3ObjectMetadata
withCacheControl(java.lang.String cacheControl)
S3ObjectMetadata
withContentDisposition(java.lang.String contentDisposition)
S3ObjectMetadata
withContentEncoding(java.lang.String contentEncoding)
S3ObjectMetadata
withContentLength(int contentLength)
S3ObjectMetadata
withContentLength(java.lang.Long contentLength)
S3ObjectMetadata
withContentMd5(java.lang.String contentMd5)
S3ObjectMetadata
withContentType(java.lang.String contentType)
S3ObjectMetadata
withHttpExpires(java.util.Date httpExpires)
S3ObjectMetadata
withObjectLockLegalHold(ObjectLockLegalHold objectLockLegalHold)
S3ObjectMetadata
withObjectLockRetention(ObjectLockRetention objectLockRetention)
S3ObjectMetadata
withRetentionPeriod(java.lang.Long retentionPeriod)
S3ObjectMetadata
withRetentionPolicy(java.lang.String retentionPolicy)
S3ObjectMetadata
withServerSideEncryption(SseAlgorithm serverSideEncryption)
S3ObjectMetadata
withTaggingCount(int taggingCount)
-
-
-
Field Detail
-
EXPIRY_DATE
public static final java.lang.String EXPIRY_DATE
- See Also:
- Constant Field Values
-
RULE_ID
public static final java.lang.String RULE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromHeaders
public static <T> S3ObjectMetadata fromHeaders(java.util.Map<java.lang.String,java.util.List<T>> headers)
-
getExpirationDate
public static <T> java.util.Date getExpirationDate(java.util.Map<java.lang.String,java.util.List<T>> headers)
-
getExpirationRuleId
public static <T> java.lang.String getExpirationRuleId(java.util.Map<java.lang.String,java.util.List<T>> headers)
-
getUserMetadata
public static <T> java.util.Map<java.lang.String,java.lang.String> getUserMetadata(java.util.Map<java.lang.String,java.util.List<T>> headers)
-
getUserMetadataKey
protected static java.lang.String getUserMetadataKey(java.lang.String headerName)
-
getObjectLockLegalHold
protected static <T> ObjectLockLegalHold getObjectLockLegalHold(java.util.Map<java.lang.String,java.util.List<T>> headers)
-
getObjectLockRetention
protected static <T> ObjectLockRetention getObjectLockRetention(java.util.Map<java.lang.String,java.util.List<T>> headers)
-
toHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> toHeaders()
-
getUmdHeaders
public static java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getUmdHeaders(java.util.Map<java.lang.String,java.lang.String> userMetadata)
-
getHeaderName
public static java.lang.String getHeaderName(java.lang.String userMetadataKey)
-
getCacheControl
public java.lang.String getCacheControl()
-
setCacheControl
public void setCacheControl(java.lang.String cacheControl)
-
getContentDisposition
public java.lang.String getContentDisposition()
-
setContentDisposition
public void setContentDisposition(java.lang.String contentDisposition)
-
getContentEncoding
public java.lang.String getContentEncoding()
-
setContentEncoding
public void setContentEncoding(java.lang.String contentEncoding)
-
getContentLength
public java.lang.Long getContentLength()
-
setContentLength
public void setContentLength(java.lang.Long contentLength)
-
getContentMd5
public java.lang.String getContentMd5()
-
setContentMd5
public void setContentMd5(java.lang.String contentMd5)
-
getContentType
public java.lang.String getContentType()
-
setContentType
public void setContentType(java.lang.String contentType)
-
getETag
public java.lang.String getETag()
-
setETag
public void setETag(java.lang.String eTag)
-
getRetentionPeriod
public java.lang.Long getRetentionPeriod()
-
setRetentionPeriod
public void setRetentionPeriod(java.lang.Long retentionPeriod)
-
getRetentionPolicy
public java.lang.String getRetentionPolicy()
-
setRetentionPolicy
public void setRetentionPolicy(java.lang.String retentionPolicy)
-
getExpirationDate
public java.util.Date getExpirationDate()
-
setExpirationDate
public void setExpirationDate(java.util.Date expirationDate)
-
getExpirationRuleId
public java.lang.String getExpirationRuleId()
-
setExpirationRuleId
public void setExpirationRuleId(java.lang.String expirationRuleId)
-
getHttpExpires
public java.util.Date getHttpExpires()
-
setHttpExpires
public void setHttpExpires(java.util.Date httpExpires)
-
getLastModified
public java.util.Date getLastModified()
-
setLastModified
public void setLastModified(java.util.Date lastModified)
-
getVersionId
public java.lang.String getVersionId()
-
setVersionId
public void setVersionId(java.lang.String versionId)
-
getUserMetadata
public java.util.Map<java.lang.String,java.lang.String> getUserMetadata()
-
setUserMetadata
public void setUserMetadata(java.util.Map<java.lang.String,java.lang.String> userMetadata)
Stores a copy of the map to prevent internal alterations (i.e. codecs) from affecting the original map
-
getUserMetadata
public java.lang.String getUserMetadata(java.lang.String name)
-
getDecodedUserMetadata
public java.lang.String getDecodedUserMetadata(java.lang.String name)
-
getObjectLockLegalHold
public ObjectLockLegalHold getObjectLockLegalHold()
-
setObjectLockLegalHold
public void setObjectLockLegalHold(ObjectLockLegalHold objectLockLegalHold)
-
getObjectLockRetention
public ObjectLockRetention getObjectLockRetention()
-
setObjectLockRetention
public void setObjectLockRetention(ObjectLockRetention objectLockRetention)
-
getServerSideEncryption
public SseAlgorithm getServerSideEncryption()
-
setServerSideEncryption
public void setServerSideEncryption(SseAlgorithm serverSideEncryption)
- Parameters:
serverSideEncryption
- the SseAlgorithm only supports AES256, AWS KMS is not supported.
-
addUserMetadata
public S3ObjectMetadata addUserMetadata(java.lang.String name, java.lang.String value)
-
addEncodedUserMetadata
public S3ObjectMetadata addEncodedUserMetadata(java.lang.String name, java.lang.String value)
-
getTaggingCount
public int getTaggingCount()
-
setTaggingCount
public void setTaggingCount(int taggingCount)
-
withContentType
public S3ObjectMetadata withContentType(java.lang.String contentType)
-
withContentLength
public S3ObjectMetadata withContentLength(java.lang.Long contentLength)
-
withContentLength
public S3ObjectMetadata withContentLength(int contentLength)
-
withContentMd5
public S3ObjectMetadata withContentMd5(java.lang.String contentMd5)
-
withContentDisposition
public S3ObjectMetadata withContentDisposition(java.lang.String contentDisposition)
-
withContentEncoding
public S3ObjectMetadata withContentEncoding(java.lang.String contentEncoding)
-
withCacheControl
public S3ObjectMetadata withCacheControl(java.lang.String cacheControl)
-
withHttpExpires
public S3ObjectMetadata withHttpExpires(java.util.Date httpExpires)
-
withRetentionPeriod
public S3ObjectMetadata withRetentionPeriod(java.lang.Long retentionPeriod)
-
withRetentionPolicy
public S3ObjectMetadata withRetentionPolicy(java.lang.String retentionPolicy)
-
withObjectLockLegalHold
public S3ObjectMetadata withObjectLockLegalHold(ObjectLockLegalHold objectLockLegalHold)
-
withObjectLockRetention
public S3ObjectMetadata withObjectLockRetention(ObjectLockRetention objectLockRetention)
-
withTaggingCount
public S3ObjectMetadata withTaggingCount(int taggingCount)
-
withServerSideEncryption
public S3ObjectMetadata withServerSideEncryption(SseAlgorithm serverSideEncryption)
- Parameters:
serverSideEncryption
- the SseAlgorithm only supports AES256, AWS KMS is not supported.
-
-