AccountSasPermission Class
- java.
lang. Object - com.
azure. storage. common. sas. AccountSasPermission
- com.
public final class AccountSasPermission
This is a helper class to construct a string representing the permissions granted by an Account SAS. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on AccountSasSignatureValues.
It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.
Constructor | Description |
---|---|
Account |
Initializes an AccountSasPermission object with all fields set to false. |
Modifier and Type | Method and Description |
---|---|
boolean |
has Whether add permission has been set. |
boolean |
has Whether create permission has been set. |
boolean |
has Whether delete permission has been set. |
boolean |
has Whether delete version permission has been set. |
boolean |
has Whether filter tags permission has been set. |
boolean |
has Whether immutability policy permissions has been set. |
boolean |
has Whether list permission has been set. |
boolean |
has Whether permanent delete permission has been set. |
boolean |
has Returns the process messages permission, this allows the retrieval and deletion of queue messages. |
boolean |
has Whether read permission has been set. |
boolean |
has Whether tags permissions has been set. |
boolean |
has Returns the update permission status, it allows the update of queue message and tables. |
boolean |
has Whether write permission has been set. |
static
Account |
parse(String permission Creates an AccountSasPermission from the specified permissions string. |
Account |
set Sets the add permission status. |
Account |
set Sets the create permission status. |
Account |
set Sets the delete permission status. |
Account |
set Sets the delete version permission status. |
Account |
set Sets the filter tags permission status. |
Account |
set Sets the set immutability policy permission status. |
Account |
set Sets the list permission status. |
Account |
set Sets the permanent delete permission status. |
Account |
set Sets the process messages permission, this allows the retrieval and deletion of queue messages. |
Account |
set Sets the read permission status. |
Account |
set Sets the tags permission status. |
Account |
set Sets the update permission status, it allows the update of queue messages and tables. |
Account |
set Sets the write permission status. |
String |
to Converts the given permissions to a String. |
Methods inherited from java.lang.Object
AccountSasPermission
public AccountSasPermission()
Initializes an AccountSasPermission object with all fields set to false.
hasAddPermission
public boolean hasAddPermission()
Whether add permission has been set.
Returns:
hasCreatePermission
public boolean hasCreatePermission()
Whether create permission has been set.
Returns:
hasDeletePermission
public boolean hasDeletePermission()
Whether delete permission has been set.
Returns:
hasDeleteVersionPermission
public boolean hasDeleteVersionPermission()
Whether delete version permission has been set.
Returns:
hasFilterTagsPermission
public boolean hasFilterTagsPermission()
Whether filter tags permission has been set.
Returns:
hasImmutabilityPolicyPermission
public boolean hasImmutabilityPolicyPermission()
Whether immutability policy permissions has been set.
Returns:
hasListPermission
public boolean hasListPermission()
Whether list permission has been set.
Returns:
hasPermanentDeletePermission
public boolean hasPermanentDeletePermission()
Whether permanent delete permission has been set.
Returns:
hasProcessMessages
public boolean hasProcessMessages()
Returns the process messages permission, this allows the retrieval and deletion of queue messages.
Returns:
hasReadPermission
public boolean hasReadPermission()
Whether read permission has been set.
Returns:
hasTagsPermission
public boolean hasTagsPermission()
Whether tags permissions has been set.
Returns:
hasUpdatePermission
public boolean hasUpdatePermission()
Returns the update permission status, it allows the update of queue message and tables.
Returns:
hasWritePermission
public boolean hasWritePermission()
Whether write permission has been set.
Returns:
parse
public static AccountSasPermission parse(String permissionString)
Creates an AccountSasPermission from the specified permissions string. This method will throw an IllegalArgumentException if it encounters a character that does not correspond to a valid permission.
Parameters:
Returns:
setAddPermission
public AccountSasPermission setAddPermission(boolean hasAddPermission)
Sets the add permission status.
Parameters:
Returns:
setCreatePermission
public AccountSasPermission setCreatePermission(boolean hasCreatePermission)
Sets the create permission status.
Parameters:
Returns:
setDeletePermission
public AccountSasPermission setDeletePermission(boolean hasDeletePermission)
Sets the delete permission status.
Parameters:
Returns:
setDeleteVersionPermission
public AccountSasPermission setDeleteVersionPermission(boolean hasDeleteVersionPermission)
Sets the delete version permission status.
Parameters:
Returns:
setFilterTagsPermission
public AccountSasPermission setFilterTagsPermission(boolean filterTagsPermission)
Sets the filter tags permission status.
Parameters:
Returns:
setImmutabilityPolicyPermission
public AccountSasPermission setImmutabilityPolicyPermission(boolean immutabilityPolicyPermission)
Sets the set immutability policy permission status.
Parameters:
Returns:
setListPermission
public AccountSasPermission setListPermission(boolean hasListPermission)
Sets the list permission status. This permission grants the ability to list blob containers, blobs, shares, directories, and files.
Parameters:
Returns:
setPermanentDeletePermission
public AccountSasPermission setPermanentDeletePermission(boolean permanentDeletePermission)
Sets the permanent delete permission status.
Parameters:
Returns:
setProcessMessages
public AccountSasPermission setProcessMessages(boolean hasProcessMessagesPermission)
Sets the process messages permission, this allows the retrieval and deletion of queue messages.
Parameters:
Returns:
setReadPermission
public AccountSasPermission setReadPermission(boolean hasReadPermission)
Sets the read permission status.
Parameters:
Returns:
setTagsPermission
public AccountSasPermission setTagsPermission(boolean tagsPermission)
Sets the tags permission status.
Parameters:
Returns:
setUpdatePermission
public AccountSasPermission setUpdatePermission(boolean hasUpdatePermission)
Sets the update permission status, it allows the update of queue messages and tables.
Parameters:
Returns:
setWritePermission
public AccountSasPermission setWritePermission(boolean hasWritePermission)
Sets the write permission status.
Parameters:
Returns:
toString
public String toString()
Converts the given permissions to a String. Using this method will guarantee the permissions are in an order accepted by the service.
Overrides:
AccountSasPermission.toString()Returns:
Feedback su Azure SDK for Java
Azure SDK for Java è un progetto di open source. Selezionare un collegamento per fornire feedback: