public final class TableSasPermission extends Object
toString and set as the permissions field on
TableSasSignatureValues.setPermissions(TableSasPermission) TableSasSignatureValues}.
It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.
TableSasSignatureValues| Constructor and Description |
|---|
TableSasPermission() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasAddPermission()
Gets the add permission status.
|
boolean |
hasDeletePermission()
Gets the delete permission status.
|
boolean |
hasReadPermission()
Gets the read permissions status.
|
boolean |
hasUpdatePermission()
Gets the update permission status.
|
static TableSasPermission |
parse(String permString)
Creates a
TableSasPermission from the specified permissions string. |
TableSasPermission |
setAddPermission(boolean hasAddPermission)
Sets the add permission status.
|
TableSasPermission |
setDeletePermission(boolean hasDeletePermission)
Sets the process permission status.
|
TableSasPermission |
setReadPermission(boolean hasReadPermission)
Sets the read permission status.
|
TableSasPermission |
setUpdatePermission(boolean hasUpdatePermission)
Sets the update permission status.
|
String |
toString()
Converts the given permissions to a
String. |
public static TableSasPermission parse(String permString)
TableSasPermission from the specified permissions string. This method will throw an
IllegalArgumentException if it encounters a character that does not correspond to a valid permission.permString - A String which represents the TableSasPermission.TableSasPermission generated from the given String.IllegalArgumentException - If permString contains a character other than r, a, u, or d.public boolean hasReadPermission()
true if the SAS has permission to get entities and query entities. false, otherwise.public TableSasPermission setReadPermission(boolean hasReadPermission)
hasReadPermission - true if the SAS has permission to get entities and query entities.
false, otherwisepublic boolean hasAddPermission()
true if the SAS has permission to add entities to the table. false, otherwise.public TableSasPermission setAddPermission(boolean hasAddPermission)
hasAddPermission - true if the SAS has permission to add entities to the table. false,
otherwise.
Note: The add and update permissions are required for upsert operations.
TableSasPermission object.public boolean hasUpdatePermission()
true if the SAS has permission to update entities in the table. false, otherwise.public TableSasPermission setUpdatePermission(boolean hasUpdatePermission)
Note: The add and update permissions are required for upsert operations.
hasUpdatePermission - true if the SAS has permission to update entities in the table. false,
otherwise.TableSasPermission object.public boolean hasDeletePermission()
true if the SAS has permission to delete entities from the table. false, otherwise.public TableSasPermission setDeletePermission(boolean hasDeletePermission)
hasDeletePermission - true if the SAS has permission to delete entities from the table.
false, otherwise.TableSasPermission object.public String toString()
String. Using this method will guarantee the permissions are in an
order accepted by the service. If all permissions are set to false, an empty string is returned from this method.toString in class ObjectString which represents the TableSasPermission.Copyright © 2021 Microsoft Corporation. All rights reserved.