com.obs.services.model

## 类 PolicyTempSignatureRequest

- java.lang.Object
- - com.obs.services.model.AbstractTemporarySignatureRequest
  - - com.obs.services.model.PolicyTempSignatureRequest

-     public class PolicyTempSignatureRequest
      extends AbstractTemporarySignatureRequest

  Request parameters of policy-based temporary access authorization

- - ### 字段概要

    - ### 从类继承的字段 com.obs.services.model.AbstractTemporarySignatureRequest

      `bucketName, headers, method, objectKey, queryParams, specialParam`

  - ### 构造器概要

    构造器
    构造器和说明
    `PolicyTempSignatureRequest()`
    `PolicyTempSignatureRequest(HttpMethodEnum method, String bucketName, String objectKey)` Constructor
    `PolicyTempSignatureRequest(HttpMethodEnum method, String bucketName, String objectKey, Date expiryDate)` Constructor
    `PolicyTempSignatureRequest(HttpMethodEnum method, String bucketName, String objectKey, long expires)` Constructor

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `String` | `generatePolicy()` Generate a policy based on the validity period and policy condition.
    `List<PolicyConditionItem>` | `getConditions()` Obtain the condition set of the policy.
    `long` | `getExpires()` Obtain the validity period.
    `Date` | `getExpiryDate()` Set the expiration date.
    `void` | `setConditions(List<PolicyConditionItem> conditions)` Set the condition set of the policy.
    `void` | `setExpires(long expires)` Set the validity period (seconds).
    `void` | `setExpiryDate(Date expiryDate)` Obtain the expiration date.

    - ### 从类继承的方法 com.obs.services.model.AbstractTemporarySignatureRequest

      `getBucketName, getHeaders, getMethod, getObjectKey, getQueryParams, getSpecialParam, setBucketName, setHeaders, setMethod, setObjectKey, setQueryParams, setSpecialParam`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### PolicyTempSignatureRequest

          public PolicyTempSignatureRequest()

    - #### PolicyTempSignatureRequest

          public PolicyTempSignatureRequest(HttpMethodEnum method,
                                            String bucketName,
                                            String objectKey)

      Constructor
      参数:
        `method` - HTTP/HTTPS request method
        `bucketName` - Bucket name
        `objectKey` - Object name

    - #### PolicyTempSignatureRequest

          public PolicyTempSignatureRequest(HttpMethodEnum method,
                                            String bucketName,
                                            String objectKey,
                                            Date expiryDate)

      Constructor
      参数:
        `method` - HTTP/HTTPS request method
        `bucketName` - Bucket name
        `objectKey` - Object name
        `expiryDate` - Expiration data

    - #### PolicyTempSignatureRequest

          public PolicyTempSignatureRequest(HttpMethodEnum method,
                                            String bucketName,
                                            String objectKey,
                                            long expires)

      Constructor
      参数:
        `method` - HTTP/HTTPS request method
        `bucketName` - Bucket name
        `objectKey` - Object name
        `expires` - Validity period

  - ### 方法详细资料

    - #### generatePolicy

          public String generatePolicy()

      Generate a policy based on the validity period and policy condition.
      返回:

    - #### getExpiryDate

          public Date getExpiryDate()

      Set the expiration date.
      返回:
        Expiration date

    - #### setExpiryDate

          public void setExpiryDate(Date expiryDate)

      Obtain the expiration date.
      参数:
        `expiryDate` - Expiration date

    - #### getExpires

          public long getExpires()

      Obtain the validity period. The default value is 5 minutes (300 seconds).
      返回:
        Validity period

    - #### setExpires

          public void setExpires(long expires)

      Set the validity period (seconds).
      参数:
        `expires` - Validity period

    - #### getConditions

          public List<PolicyConditionItem> getConditions()

      Obtain the condition set of the policy.
      返回:
        Policy condition set

    - #### setConditions

          public void setConditions(List<PolicyConditionItem> conditions)

      Set the condition set of the policy.
      参数:
        `conditions` - Policy condition set

Copyright © 2021. All rights reserved.