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