你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
BlobContainerSasPermission Class
- java.
lang. Object - com.
azure. storage. blob. sas. BlobContainerSasPermission
- com.
public final class BlobContainerSasPermission
This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. 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 Summary
Constructor | Description |
---|---|
BlobContainerSasPermission() |
Initializes an |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
BlobContainerSasPermission
public BlobContainerSasPermission()
Initializes an BlobContainerSasPermission
object with all fields set to false.
Method Details
hasAddPermission
public boolean hasAddPermission()
Returns:
hasCreatePermission
public boolean hasCreatePermission()
Returns:
hasDeletePermission
public boolean hasDeletePermission()
Returns:
hasDeleteVersionPermission
public boolean hasDeleteVersionPermission()
Returns:
hasExecutePermission
public boolean hasExecutePermission()
Returns:
hasFilterPermission
public boolean hasFilterPermission()
Returns:
hasImmutabilityPolicyPermission
public boolean hasImmutabilityPolicyPermission()
Returns:
hasListPermission
public boolean hasListPermission()
Returns:
hasMovePermission
public boolean hasMovePermission()
Returns:
hasReadPermission
public boolean hasReadPermission()
Returns:
hasTagsPermission
public boolean hasTagsPermission()
Returns:
hasWritePermission
public boolean hasWritePermission()
Returns:
parse
public static BlobContainerSasPermission parse(String permissionString)
Creates an BlobContainerSasPermission
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:
String
which represents the BlobContainerSasPermission
.
Returns:
BlobContainerSasPermission
generated from the given String
.setAddPermission
public BlobContainerSasPermission setAddPermission(boolean hasAddPermission)
Sets the add permission status.
Parameters:
Returns:
setCreatePermission
public BlobContainerSasPermission setCreatePermission(boolean hasCreatePermission)
Sets the create permission status.
Parameters:
Returns:
setDeletePermission
public BlobContainerSasPermission setDeletePermission(boolean hasDeletePermission)
Sets the delete permission status.
Parameters:
Returns:
setDeleteVersionPermission
public BlobContainerSasPermission setDeleteVersionPermission(boolean hasDeleteVersionPermission)
Sets the delete version permission status.
Parameters:
Returns:
setExecutePermission
public BlobContainerSasPermission setExecutePermission(boolean hasExecutePermission)
Sets the execute permission status.
Parameters:
Returns:
setFilterPermission
public BlobContainerSasPermission setFilterPermission(boolean hasFilterPermission)
Sets the filter permission status.
Parameters:
Returns:
setImmutabilityPolicyPermission
public BlobContainerSasPermission setImmutabilityPolicyPermission(boolean immutabilityPolicyPermission)
Sets the set immutability policy permission status.
Parameters:
Returns:
setListPermission
public BlobContainerSasPermission setListPermission(boolean hasListPermission)
Sets the list permission status.
Parameters:
Returns:
setMovePermission
public BlobContainerSasPermission setMovePermission(boolean hasMovePermission)
Sets the move permission status.
Parameters:
Returns:
setReadPermission
public BlobContainerSasPermission setReadPermission(boolean hasReadPermission)
Sets the read permission status.
Parameters:
Returns:
setTagsPermission
public BlobContainerSasPermission setTagsPermission(boolean tagsPermission)
Sets the tags permission status.
Parameters:
Returns:
setWritePermission
public BlobContainerSasPermission 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:
BlobContainerSasPermission.toString()Returns:
String
which represents the BlobContainerSasPermission
.