public class PolicyTempSignatureRequest extends AbstractTemporarySignatureRequest
bucketName, headers, method, objectKey, queryParams, specialParam| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getBucketName, getHeaders, getMethod, getObjectKey, getQueryParams, getSpecialParam, setBucketName, setHeaders, setMethod, setObjectKey, setQueryParams, setSpecialParampublic PolicyTempSignatureRequest()
public PolicyTempSignatureRequest(HttpMethodEnum method, String bucketName, String objectKey)
method - HTTP/HTTPS request methodbucketName - Bucket nameobjectKey - Object namepublic PolicyTempSignatureRequest(HttpMethodEnum method, String bucketName, String objectKey, Date expiryDate)
method - HTTP/HTTPS request methodbucketName - Bucket nameobjectKey - Object nameexpiryDate - Expiration datapublic PolicyTempSignatureRequest(HttpMethodEnum method, String bucketName, String objectKey, long expires)
method - HTTP/HTTPS request methodbucketName - Bucket nameobjectKey - Object nameexpires - Validity periodpublic String generatePolicy()
public Date getExpiryDate()
public void setExpiryDate(Date expiryDate)
expiryDate - Expiration datepublic long getExpires()
public void setExpires(long expires)
expires - Validity periodpublic List<PolicyConditionItem> getConditions()
public void setConditions(List<PolicyConditionItem> conditions)
conditions - Policy condition setCopyright © 2019. All rights reserved.