TableAccountSasService Class
- java.
lang. Object - com.
azure. data. tables. sas. TableAccountSasService
- com.
public final class TableAccountSasService
This is a helper class to construct a string representing the services accessible by an Account SAS. Setting a value to true means that any SAS which uses these permissions will grant access to that service. Once all the values are set, this should be serialized with toString()
and set as the services field on an TableAccountSasSignatureValues object. It is possible to construct the services string without this class, but the order of the services is particular and this class guarantees correctness.
Constructor Summary
Constructor | Description |
---|---|
TableAccountSasService() |
Creates a TableAccountSasService with all fields set to false. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean |
hasBlobAccess()
Returns the access status for blob resources. |
boolean |
hasFileAccess()
Returns the access status for file resources. |
boolean |
hasQueueAccess()
Returns the access status for queue resources. |
boolean |
hasTableAccess()
Returns the access status for table resources. |
static
Table |
parse(String servicesString)
Creates an TableAccountSasService from the specified services string. |
Table |
setBlobAccess(boolean blob)
Sets the access status for blob resources. |
Table |
setFileAccess(boolean file)
Sets the access status for file resources. |
Table |
setQueueAccess(boolean queue)
Sets the access status for queue resources. |
Table |
setTableAccess(boolean table)
Sets the access status for table resources. |
String |
toString()
Converts the given services to a |
Methods inherited from java.lang.Object
Constructor Details
TableAccountSasService
public TableAccountSasService()
Creates a TableAccountSasService with all fields set to false.
Method Details
hasBlobAccess
public boolean hasBlobAccess()
Returns the access status for blob resources.
Returns:
hasFileAccess
public boolean hasFileAccess()
Returns the access status for file resources.
Returns:
hasQueueAccess
public boolean hasQueueAccess()
Returns the access status for queue resources.
Returns:
hasTableAccess
public boolean hasTableAccess()
Returns the access status for table resources.
Returns:
parse
public static TableAccountSasService parse(String servicesString)
Creates an TableAccountSasService from the specified services string. This method will throw an IllegalArgumentException if it encounters a character that does not correspond to a valid service.
Parameters:
Returns:
String
.setBlobAccess
public TableAccountSasService setBlobAccess(boolean blob)
Sets the access status for blob resources.
Parameters:
Returns:
setFileAccess
public TableAccountSasService setFileAccess(boolean file)
Sets the access status for file resources.
Parameters:
Returns:
setQueueAccess
public TableAccountSasService setQueueAccess(boolean queue)
Sets the access status for queue resources.
Parameters:
Returns:
setTableAccess
public TableAccountSasService setTableAccess(boolean table)
Sets the access status for table resources.
Parameters:
Returns:
toString
public String toString()
Converts the given services to a String
. Using this method will guarantee the services are in an order accepted by the service. If all services are set to false, an empty string is returned from this method.
Overrides:
TableAccountSasService.toString()Returns:
String
which represents the TableAccountSasService.Applies to
Azure SDK for Java