public class SetObjectMetadataRequest extends GenericRequest
Constructor and Description |
---|
SetObjectMetadataRequest() |
SetObjectMetadataRequest(String bucketName,
String objectKey)
构造函数
|
SetObjectMetadataRequest(String bucketName,
String objectKey,
String versionId)
构造函数
|
Modifier and Type | Method and Description |
---|---|
void |
addAllUserMetadata(Map<String,String> userMetadata)
新增一组对象的自定义元数据
|
void |
addUserMetadata(String key,
String value)
新增对象的自定义元数据
|
String |
getBucketName()
获取桶名
|
String |
getCacheControl()
获取重写响应中的Cache-Control头
|
String |
getContentDisposition()
获取重写响应中的Content-Disposition头
|
String |
getContentEncoding()
获取重写响应中的Content-Encoding头
|
String |
getContentLanguage()
获取重写响应中的Content-Language头
|
String |
getContentType()
获取重写响应中的Content-Type头
|
String |
getExpires()
获取重写响应中的Expires头
|
Map<String,String> |
getMetadata() |
String |
getObjectKey()
获取对象名
|
StorageClassEnum |
getObjectStorageClass()
获取对象的存储类型
|
Object |
getUserMetadata(String key)
获取对象的自定义元数据
|
String |
getVersionId()
获取对象版本号
|
String |
getWebSiteRedirectLocation()
设置对象的重定向链接,可以将获取这个对象的请求重定向到桶内另一个对象或一个外部的URL
|
boolean |
isRemoveUnset()
判断是否删除未指定属性, 默认为false true:
使用当前请求中的各项参数设置对象属性,对于已经存在值的属性进行替换,不存在值的属性进行赋值,未指定的属性删除 false:
使用当前请求中的各项参数设置对象属性,对于已经存在值的属性进行替换,不存在值的属性进行赋值,未指定的属性保持不变
|
void |
setBucketName(String bucketName)
设置桶名
|
void |
setCacheControl(String cacheControl)
设置重写响应中的Cache-Control头
|
void |
setContentDisposition(String contentDisposition)
设置重写响应中的Content-Disposition头
|
void |
setContentEncoding(String contentEncoding)
设置重写响应中的Content-Encoding头
|
void |
setContentLanguage(String contentLanguage)
设置重写响应中的Content-Language头
|
void |
setContentType(String contentType)
设置重写响应中的Content-Type头
|
void |
setExpires(String expires)
设置重写响应中的Expires头
|
void |
setObjectKey(String objectKey)
设置对象名
|
void |
setObjectStorageClass(StorageClassEnum storageClass)
设置对象的存储类型
|
void |
setRemoveUnset(boolean removeUnset)
设置是否删除未指定属性
|
void |
setVersionId(String versionId)
设置对象版本号
|
void |
setWebSiteRedirectLocation(String webSiteRedirectLocation)
获取对象的重定向链接,可以将获取这个对象的请求重定向到桶内另一个对象或一个外部的URL
|
String |
toString() |
isRequesterPays, setRequesterPays
public SetObjectMetadataRequest()
public SetObjectMetadataRequest(String bucketName, String objectKey)
bucketName
- 桶名objectKey
- 对象名public String getBucketName()
public void setBucketName(String bucketName)
bucketName
- 桶名public String getObjectKey()
public void setObjectKey(String objectKey)
objectKey
- 对象名public String getVersionId()
public void setVersionId(String versionId)
versionId
- 对象版本号public String getWebSiteRedirectLocation()
public void setWebSiteRedirectLocation(String webSiteRedirectLocation)
webSiteRedirectLocation
- 重定向链接public StorageClassEnum getObjectStorageClass()
public void setObjectStorageClass(StorageClassEnum storageClass)
storageClass
- 对象的存储类型public boolean isRemoveUnset()
public void setRemoveUnset(boolean removeUnset)
removeUnset
- 是否删除未指定属性标识public void addUserMetadata(String key, String value)
key
- 自定义元数据的关键字value
- 自定义元数据的值public void addAllUserMetadata(Map<String,String> userMetadata)
userMetadata
- 一组对象的自定义元数据public Object getUserMetadata(String key)
key
- 自定义元数据的关键字public String getContentType()
public void setContentType(String contentType)
contentType
- 响应中的Content-Type头public String getContentLanguage()
public void setContentLanguage(String contentLanguage)
contentLanguage
- 响应中的Content-Language头public String getExpires()
public void setExpires(String expires)
expires
- 响应中的Expires头public String getCacheControl()
public void setCacheControl(String cacheControl)
cacheControl
- 响应中的Cache-Control头public String getContentDisposition()
public void setContentDisposition(String contentDisposition)
contentDisposition
- 响应中的Content-Disposition头public String getContentEncoding()
public void setContentEncoding(String contentEncoding)
contentEncoding
- 响应中的Content-Encoding头public String toString()
toString
in class GenericRequest
Copyright © 2021. All rights reserved.