public class SetObjectMetadataRequest extends Object
Constructor and Description |
---|
SetObjectMetadataRequest() |
SetObjectMetadataRequest(String bucketName,
String objectKey)
Constructor
|
SetObjectMetadataRequest(String bucketName,
String objectKey,
String versionId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addAllUserMetadata(Map<String,String> userMetadata)
Add customized metadata for a group of objects.
|
void |
addUserMetadata(String key,
String value)
Add customized metadata for an object.
|
String |
getBucketName()
Obtain the bucket name.
|
String |
getCacheControl()
Obtain the rewritten "Cache-Control" header in the response.
|
String |
getContentDisposition()
Obtain the rewritten "Content-Disposition" header in the response.
|
String |
getContentEncoding()
Obtain the rewritten "Content-Encoding" header in the response.
|
String |
getContentLanguage()
Obtain the rewritten "Content-Language" header in the response.
|
String |
getContentType()
Obtain the rewritten "Content-Type" header in the response.
|
String |
getExpires()
Obtain the rewritten "Expires" header in the response.
|
Map<String,String> |
getMetadata() |
String |
getObjectKey()
Obtain the object name.
|
StorageClassEnum |
getObjectStorageClass()
Obtain the object storage class.
|
Object |
getUserMetadata(String key)
Obtain the customized metadata of an object.
|
String |
getVersionId()
Obtain the object version ID.
|
String |
getWebSiteRedirectLocation()
Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
|
boolean |
isRemoveUnset()
Specify whether to delete not specified properties.
|
void |
setBucketName(String bucketName)
Set the bucket name.
|
void |
setCacheControl(String cacheControl)
Rewrite the "Cache-Control" header in the response.
|
void |
setContentDisposition(String contentDisposition)
Rewrite the "Content-Disposition" header in the response.
|
void |
setContentEncoding(String contentEncoding)
Rewrite the "Content-Encoding" header in the response.
|
void |
setContentLanguage(String contentLanguage)
Rewrite the "Content-Language" header in the response.
|
void |
setContentType(String contentType)
Rewrite the "Content-Type" header in the response.
|
void |
setExpires(String expires)
Rewrite the "Expires" header in the response.
|
void |
setObjectKey(String objectKey)
Set the object name.
|
void |
setObjectStorageClass(StorageClassEnum storageClass)
Set the object storage class.
|
void |
setRemoveUnset(boolean removeUnset)
Specify whether to delete not specified properties.
|
void |
setVersionId(String versionId)
Set the version ID of the object.
|
void |
setWebSiteRedirectLocation(String webSiteRedirectLocation)
Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
|
String |
toString() |
public SetObjectMetadataRequest()
public SetObjectMetadataRequest(String bucketName, String objectKey)
bucketName
- Bucket nameobjectKey
- Object namepublic String getBucketName()
public void setBucketName(String bucketName)
bucketName
- Bucket namepublic String getObjectKey()
public void setObjectKey(String objectKey)
objectKey
- Object namepublic String getVersionId()
public void setVersionId(String versionId)
versionId
- Version ID of the objectpublic String getWebSiteRedirectLocation()
public void setWebSiteRedirectLocation(String webSiteRedirectLocation)
webSiteRedirectLocation
- Redirection linkpublic StorageClassEnum getObjectStorageClass()
public void setObjectStorageClass(StorageClassEnum storageClass)
storageClass
- Object storage classpublic boolean isRemoveUnset()
public void setRemoveUnset(boolean removeUnset)
removeUnset
- Identifier specifying whether to delete not specified propertiespublic void addUserMetadata(String key, String value)
key
- Keyword of the customized metadatavalue
- Value of the customized metadatapublic void addAllUserMetadata(Map<String,String> userMetadata)
userMetadata
- Customized metadata for a group of objectspublic Object getUserMetadata(String key)
key
- Keyword of the customized metadatapublic String getContentType()
public void setContentType(String contentType)
contentType
- "Content-Type" header in the responsepublic String getContentLanguage()
public void setContentLanguage(String contentLanguage)
contentLanguage
- "Content-Language" header in the responsepublic String getExpires()
public void setExpires(String expires)
expires
- Rewritten "Expires" header in the responsepublic String getCacheControl()
public void setCacheControl(String cacheControl)
cacheControl
- "Cache-Control" header in the responsepublic String getContentDisposition()
public void setContentDisposition(String contentDisposition)
contentDisposition
- "Content-Disposition" header in the responsepublic String getContentEncoding()
public void setContentEncoding(String contentEncoding)
contentEncoding
- "Content-Encoding" header in the responseCopyright © 2019. All rights reserved.