public class SetObjectMetadataRequest extends BaseObjectRequest
objectKeybucketName, httpMethod, userHeaders| 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.
|
Map<String,String> |
getAllUserMetadata() |
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()
Deprecated.
|
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 |
isEncodeHeaders()
Specifies whether to encode and decode the returned header fields.
|
boolean |
isRemoveUnset()
Specify whether to delete not specified properties.
|
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 |
setIsEncodeHeaders(boolean encodeHeaders)
Specifies whether to encode and decode the returned header fields.
|
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() |
getObjectKey, setObjectKeyaddUserHeaders, getBucketName, getHttpMethod, getUserHeaders, isRequesterPays, setBucketName, setRequesterPays, setUserHeaderspublic SetObjectMetadataRequest()
public SetObjectMetadataRequest(String bucketName, String objectKey)
bucketName - Bucket nameobjectKey - 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 response@Deprecated public Map<String,String> getMetadata()
public void setIsEncodeHeaders(boolean encodeHeaders)
setIsEncodeHeaders in class BaseObjectRequestencodeHeaders - Specifies whether to encode and decode header fields.public boolean isEncodeHeaders()
isEncodeHeaders in class BaseObjectRequestpublic String toString()
toString in class BaseObjectRequestCopyright © 2021. All rights reserved.