你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
BaseSasQueryParameters Class
- java.
lang. Object - com.
azure. storage. common. sas. BaseSasQueryParameters
- com.
@Deprecated
public abstract class BaseSasQueryParameters
Note
This class has been deprecated.
Please use the generate
Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly by the user; it is only generated by the SASSignatureValues type. Once generated, it can be set on a ClientBuilder object to be constructed as part of a URL or it can be encoded into a String
and appended to a URL directly (though caution should be taken here in case there are existing query parameters, which might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable to ensure thread safety.
Field Summary
Modifier and Type | Field and Description |
---|---|
protected
Offset |
expiryTime
The end time for the SAS's validity. |
protected String |
permissions
The permissions of the SAS. |
protected
Sas |
protocol
The allowed HTTP/HTTPS protocols. |
protected
Sas |
sasIpRange
The IP range that the SAS validates. |
protected String |
signature
The signature of the SAS. |
protected
Offset |
startTime
The start time for the SAS's validity. |
protected String |
version
The Storage version. |
Constructor Summary
Constructor | Description |
---|---|
BaseSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime, OffsetDateTime expiryTime, SasIpRange sasIpRange, String permissions, String signature) |
Deprecated
Please use Sas
Creates a new BaseSasQueryParameters object. |
BaseSasQueryParameters(Map<String,String[]> queryParamsMap, boolean removeSASParametersFromMap) |
Deprecated
Please use Sas
Creates a new BaseSasQueryParameters object. |
Method Summary
Modifier and Type | Method and Description |
---|---|
protected T |
getQueryParameter(Map<String,String[]> parameters, String name, boolean remove, Function<String,T> converter)
Deprecated
Please use Sas
Helper method to get a query parameter |
abstract String |
encode()
Deprecated
Please use the generate
Encodes all SAS query parameters into a string that can be appended to a URL. |
protected String |
formatQueryParameterDate(OffsetDateTime dateTime)
Deprecated
Please use Sas
Formats date time SAS query parameters. |
Offset |
getExpiryTime()
Deprecated
Please use Sas
|
String |
getPermissions()
Deprecated
Please use Sas
|
Sas |
getProtocol()
Deprecated
Please use Sas
|
protected String |
getQueryParameter(Map<String,String[]> parameters, String name, boolean remove)
Deprecated
Please use Sas
Helper method to get a query parameter |
Sas |
getSasIpRange()
Deprecated
Please use Sas
|
String |
getSignature()
Deprecated
Please use Sas
|
Offset |
getStartTime()
Deprecated
Please use Sas
|
String |
getVersion()
Deprecated
Please use Sas
|
protected void |
tryAppendQueryParameter(StringBuilder sb, String param, Object value)
Deprecated
Please use Sas
Shared helper method to append a SAS query parameter. |
Methods inherited from java.lang.Object
Field Details
expiryTime
protected OffsetDateTime expiryTime
The end time for the SAS's validity.
permissions
protected String permissions
The permissions of the SAS.
protocol
protected SasProtocol protocol
The allowed HTTP/HTTPS protocols.
sasIpRange
protected SasIpRange sasIpRange
The IP range that the SAS validates.
signature
protected String signature
The signature of the SAS.
startTime
protected OffsetDateTime startTime
The start time for the SAS's validity.
version
protected String version
The Storage version.
Constructor Details
BaseSasQueryParameters
@Deprecated
public BaseSasQueryParameters(String version, SasProtocol protocol, OffsetDateTime startTime, OffsetDateTime expiryTime, SasIpRange sasIpRange, String permissions, String signature)
Deprecated
Creates a new BaseSasQueryParameters object. These objects are only created internally by SASSignatureValues classes.
Parameters:
String
representing the storage version.
String
representing the allowed HTTP protocol(s) or null
.
java.util.Date
representing the start time for this SAS token or null
.
java.util.Date
representing the expiry time for this SAS token.
String
representing the storage permissions or null
.
String
representing the signature for the SAS token.
BaseSasQueryParameters
@Deprecated
public BaseSasQueryParameters(Map
Deprecated
Creates a new BaseSasQueryParameters object.
Parameters:
true
, the SAS query parameters will be removed from
queryParamsMap
Method Details
getQueryParameter
@Deprecated
protected T
Deprecated
Helper method to get a query parameter
Parameters:
Map
of parameters to values to search.
Returns:
encode
@Deprecated
public abstract String encode()
Deprecated
Encodes all SAS query parameters into a string that can be appended to a URL.
Returns:
String
representing the SAS query parameters.formatQueryParameterDate
@Deprecated
protected String formatQueryParameterDate(OffsetDateTime dateTime)
Deprecated
Formats date time SAS query parameters.
Parameters:
Returns:
getExpiryTime
@Deprecated
public OffsetDateTime getExpiryTime()
Deprecated
Returns:
getPermissions
@Deprecated
public String getPermissions()
Deprecated
Returns:
getProtocol
@Deprecated
public SasProtocol getProtocol()
Deprecated
Returns:
null
. Please refer to SasProtocol for more details.getQueryParameter
@Deprecated
protected String getQueryParameter(Map
Deprecated
Helper method to get a query parameter
Parameters:
Map
of parameters to values to search.
Returns:
getSasIpRange
getSignature
@Deprecated
public String getSignature()
Deprecated
Returns:
getStartTime
@Deprecated
public OffsetDateTime getStartTime()
Deprecated
Returns:
null
.getVersion
@Deprecated
public String getVersion()
Deprecated
Returns:
tryAppendQueryParameter
@Deprecated
protected void tryAppendQueryParameter(StringBuilder sb, String param, Object value)
Deprecated
Shared helper method to append a SAS query parameter.
Parameters:
StringBuilder
to append to.
String
parameter to append.