类 SetObjectMetadataRequest


public class SetObjectMetadataRequest extends BaseObjectRequest
Parameters in a request for setting object properties
  • 构造器详细资料

    • SetObjectMetadataRequest

      public SetObjectMetadataRequest()
    • SetObjectMetadataRequest

      public SetObjectMetadataRequest(String bucketName, String objectKey)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
    • SetObjectMetadataRequest

      public SetObjectMetadataRequest(String bucketName, String objectKey, String versionId)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      versionId - Version ID of the object
  • 方法详细资料

    • getVersionId

      public String getVersionId()
      Obtain the object version ID.
      返回:
      Version ID of the object
    • setVersionId

      public void setVersionId(String versionId)
      Set the version ID of the object.
      参数:
      versionId - Version ID of the object
    • getWebSiteRedirectLocation

      public String getWebSiteRedirectLocation()
      Set the redirection link which can redirect the request to another object in the bucket or to an external URL.
      返回:
      Redirection link
    • setWebSiteRedirectLocation

      public void setWebSiteRedirectLocation(String webSiteRedirectLocation)
      Obtain the redirection link which can redirect the request to another object in the bucket or to an external URL.
      参数:
      webSiteRedirectLocation - Redirection link
    • getObjectStorageClass

      public StorageClassEnum getObjectStorageClass()
      Obtain the object storage class.
      返回:
      Object storage class
    • setObjectStorageClass

      public void setObjectStorageClass(StorageClassEnum storageClass)
      Set the object storage class.
      参数:
      storageClass - Object storage class
    • isRemoveUnset

      public boolean isRemoveUnset()
      Specify whether to delete not specified properties. The default value is "false." true: Use properties set in the request parameters to overwrite the existing property values. Properties not specified in the request will be deleted. false: Use properties set in the request parameters to overwrite the existing property values. For properties not specified in the request, their existing values are retained.
      返回:
      Identifier specifying whether to delete not specified properties
    • setRemoveUnset

      public void setRemoveUnset(boolean removeUnset)
      Specify whether to delete not specified properties.
      参数:
      removeUnset - Identifier specifying whether to delete not specified properties
    • addUserMetadata

      public void addUserMetadata(String key, String value)
      Add customized metadata for an object.
      参数:
      key - Keyword of the customized metadata
      value - Value of the customized metadata
    • addAllUserMetadata

      public void addAllUserMetadata(Map<String,String> userMetadata)
      Add customized metadata for a group of objects.
      参数:
      userMetadata - Customized metadata for a group of objects
    • getUserMetadata

      public Object getUserMetadata(String key)
      Obtain the customized metadata of an object.
      参数:
      key - Keyword of the customized metadata
      返回:
      Value of the customized metadata
    • getContentType

      public String getContentType()
      Obtain the rewritten "Content-Type" header in the response.
      返回:
      "Content-Type" header in the response
    • setContentType

      public void setContentType(String contentType)
      Rewrite the "Content-Type" header in the response.
      参数:
      contentType - "Content-Type" header in the response
    • getContentLanguage

      public String getContentLanguage()
      Obtain the rewritten "Content-Language" header in the response.
      返回:
      "Content-Language" header in the response
    • setContentLanguage

      public void setContentLanguage(String contentLanguage)
      Rewrite the "Content-Language" header in the response.
      参数:
      contentLanguage - "Content-Language" header in the response
    • getExpires

      public String getExpires()
      Obtain the rewritten "Expires" header in the response.
      返回:
      "Expires" header in the response
    • setExpires

      public void setExpires(String expires)
      Rewrite the "Expires" header in the response.
      参数:
      expires - Rewritten "Expires" header in the response
    • getCacheControl

      public String getCacheControl()
      Obtain the rewritten "Cache-Control" header in the response.
      返回:
      "Cache-Control" header in the response
    • setCacheControl

      public void setCacheControl(String cacheControl)
      Rewrite the "Cache-Control" header in the response.
      参数:
      cacheControl - "Cache-Control" header in the response
    • getContentDisposition

      public String getContentDisposition()
      Obtain the rewritten "Content-Disposition" header in the response.
      返回:
      "Content-Disposition" header in the response
    • setContentDisposition

      public void setContentDisposition(String contentDisposition)
      Rewrite the "Content-Disposition" header in the response.
      参数:
      contentDisposition - "Content-Disposition" header in the response
    • getContentEncoding

      public String getContentEncoding()
      Obtain the rewritten "Content-Encoding" header in the response.
      返回:
      "Content-Encoding" header in the response
    • setContentEncoding

      public void setContentEncoding(String contentEncoding)
      Rewrite the "Content-Encoding" header in the response.
      参数:
      contentEncoding - "Content-Encoding" header in the response
    • getAllUserMetadata

      public Map<String,String> getAllUserMetadata()
    • getMetadata

      @Deprecated public Map<String,String> getMetadata()
      已过时。
    • setIsEncodeHeaders

      public void setIsEncodeHeaders(boolean encodeHeaders)
      Specifies whether to encode and decode the returned header fields.
      覆盖:
      setIsEncodeHeaders 在类中 BaseObjectRequest
      参数:
      encodeHeaders - Specifies whether to encode and decode header fields.
    • isEncodeHeaders

      public boolean isEncodeHeaders()
      Specifies whether to encode and decode the returned header fields.
      覆盖:
      isEncodeHeaders 在类中 BaseObjectRequest
      返回:
      Specifies whether to encode and decode header fields.
    • toString

      public String toString()
      覆盖:
      toString 在类中 BaseObjectRequest