BaseSasQueryParameters Class

  • java.lang.Object
    • com.azure.storage.common.sas.BaseSasQueryParameters

@Deprecated
public abstract class BaseSasQueryParameters

Note

This class has been deprecated. Please use the generateSas method on the desired client after initializing the appropriate SasSignatureValues object.

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 OffsetDateTime expiryTime

The end time for the SAS's validity.

protected String permissions

The permissions of the SAS.

protected SasProtocol protocol

The allowed HTTP/HTTPS protocols.

protected SasIpRange sasIpRange

The IP range that the SAS validates.

protected String signature

The signature of the SAS.

protected OffsetDateTime 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 SasSignatureValues

Creates a new BaseSasQueryParameters object.

BaseSasQueryParameters(Map<String,String[]> queryParamsMap, boolean removeSASParametersFromMap)

Deprecated

Please use SasSignatureValues

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 SasSignatureValues

Helper method to get a query parameter

abstract String encode()

Deprecated

Please use the generateSas method on the desired client after initializing the appropriate SasSignatureValues object.

Encodes all SAS query parameters into a string that can be appended to a URL.

protected String formatQueryParameterDate(OffsetDateTime dateTime)

Deprecated

Please use SasSignatureValues

Formats date time SAS query parameters.

OffsetDateTime getExpiryTime()

Deprecated

Please use SasSignatureValues
String getPermissions()

Deprecated

Please use SasSignatureValues
SasProtocol getProtocol()

Deprecated

Please use SasSignatureValues
protected String getQueryParameter(Map<String,String[]> parameters, String name, boolean remove)

Deprecated

Please use SasSignatureValues

Helper method to get a query parameter

SasIpRange getSasIpRange()

Deprecated

Please use SasSignatureValues
String getSignature()

Deprecated

Please use SasSignatureValues
OffsetDateTime getStartTime()

Deprecated

Please use SasSignatureValues
String getVersion()

Deprecated

Please use SasSignatureValues
protected void tryAppendQueryParameter(StringBuilder sb, String param, Object value)

Deprecated

Please use SasSignatureValues

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

Please use SasSignatureValues

Creates a new BaseSasQueryParameters object. These objects are only created internally by SASSignatureValues classes.

Parameters:

version - A String representing the storage version.
protocol - A String representing the allowed HTTP protocol(s) or null.
startTime - A java.util.Date representing the start time for this SAS token or null.
expiryTime - A java.util.Date representing the expiry time for this SAS token.
sasIpRange - A SasIpRange representing the range of valid IP addresses for this SAS token or null.
permissions - A String representing the storage permissions or null.
signature - A String representing the signature for the SAS token.

BaseSasQueryParameters

@Deprecated
public BaseSasQueryParameters(Map queryParamsMap, boolean removeSASParametersFromMap)

Deprecated

Please use SasSignatureValues

Creates a new BaseSasQueryParameters object.

Parameters:

queryParamsMap - All query parameters for the request as key-value pairs
removeSASParametersFromMap - When true, the SAS query parameters will be removed from queryParamsMap

Method Details

getQueryParameter

@Deprecated
protected T getQueryParameter(Map parameters, String name, boolean remove, Function converter)

Deprecated

Please use SasSignatureValues

Helper method to get a query parameter

Parameters:

parameters - A Map of parameters to values to search.
name - The name of parameter to find.
remove - Whether or not to remove the parameter from the map.
converter - Function that transforms the value to a String.

Returns:

The object

encode

@Deprecated
public abstract String encode()

Deprecated

Please use the generateSas method on the desired client after initializing the appropriate SasSignatureValues object.

Encodes all SAS query parameters into a string that can be appended to a URL.

Returns:

A String representing the SAS query parameters.

formatQueryParameterDate

@Deprecated
protected String formatQueryParameterDate(OffsetDateTime dateTime)

Deprecated

Please use SasSignatureValues

Formats date time SAS query parameters.

Parameters:

dateTime - The SAS date time.

Returns:

A String representing the SAS date time.

getExpiryTime

@Deprecated
public OffsetDateTime getExpiryTime()

Deprecated

Please use SasSignatureValues

Returns:

The expiry time for this SAS token.

getPermissions

@Deprecated
public String getPermissions()

Deprecated

Please use SasSignatureValues

Returns:

Please refer to *SASPermission classes for more details.

getProtocol

@Deprecated
public SasProtocol getProtocol()

Deprecated

Please use SasSignatureValues

Returns:

The allowed HTTP protocol(s) or null. Please refer to SasProtocol for more details.

getQueryParameter

@Deprecated
protected String getQueryParameter(Map parameters, String name, boolean remove)

Deprecated

Please use SasSignatureValues

Helper method to get a query parameter

Parameters:

parameters - A Map of parameters to values to search.
name - The name of parameter to find.
remove - Whether or not to remove the parameter from the map.

Returns:

A String representing the query parameter

getSasIpRange

@Deprecated
public SasIpRange getSasIpRange()

Deprecated

Please use SasSignatureValues

Returns:

getSignature

@Deprecated
public String getSignature()

Deprecated

Please use SasSignatureValues

Returns:

The signature for the SAS token.

getStartTime

@Deprecated
public OffsetDateTime getStartTime()

Deprecated

Please use SasSignatureValues

Returns:

The start time for this SAS token or null.

getVersion

@Deprecated
public String getVersion()

Deprecated

Please use SasSignatureValues

Returns:

The storage version

tryAppendQueryParameter

@Deprecated
protected void tryAppendQueryParameter(StringBuilder sb, String param, Object value)

Deprecated

Please use SasSignatureValues

Shared helper method to append a SAS query parameter.

Parameters:

sb - The StringBuilder to append to.
param - The String parameter to append.
value - The value of the parameter to append.

Applies to