PathSasPermission Class
- java.
lang. Object - com.
azure. storage. file. datalake. sas. PathSasPermission
- com.
public final class PathSasPermission
This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a path. 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 |
---|---|
PathSasPermission() |
Initializes a |
Method Summary
Methods inherited from java.lang.Object
Constructor Details
PathSasPermission
public PathSasPermission()
Initializes a PathSasPermission
object with all fields set to false.
Method Details
hasAddPermission
public boolean hasAddPermission()
Returns:
hasCreatePermission
public boolean hasCreatePermission()
Returns:
hasDeletePermission
public boolean hasDeletePermission()
Returns:
hasExecutePermission
public boolean hasExecutePermission()
Returns:
hasListPermission
public boolean hasListPermission()
Returns:
hasManageAccessControlPermission
public boolean hasManageAccessControlPermission()
Returns:
hasManageOwnershipPermission
public boolean hasManageOwnershipPermission()
Returns:
hasMovePermission
public boolean hasMovePermission()
Returns:
hasReadPermission
public boolean hasReadPermission()
Returns:
hasWritePermission
public boolean hasWritePermission()
Returns:
parse
public static PathSasPermission parse(String permissionString)
Creates a PathSasPermission
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 PathSasPermission
.
Returns:
PathSasPermission
generated from the given String
.setAddPermission
public PathSasPermission setAddPermission(boolean hasAddPermission)
Sets the add permission status.
Parameters:
Returns:
setCreatePermission
public PathSasPermission setCreatePermission(boolean hasCreatePermission)
Sets the create permission status.
Parameters:
Returns:
setDeletePermission
public PathSasPermission setDeletePermission(boolean hasDeletePermission)
Sets the delete permission status.
Parameters:
Returns:
setExecutePermission
public PathSasPermission setExecutePermission(boolean hasExecutePermission)
Sets the execute permission status.
Parameters:
Returns:
setListPermission
public PathSasPermission setListPermission(boolean hasListPermission)
Sets the list permission status.
Parameters:
Returns:
setManageAccessControlPermission
public PathSasPermission setManageAccessControlPermission(boolean hasManageAccessControlPermission)
Sets the manage access control permission status.
Parameters:
Returns:
setManageOwnershipPermission
public PathSasPermission setManageOwnershipPermission(boolean hasManageOwnershipPermission)
Sets the manage ownership permission status.
Parameters:
Returns:
setMovePermission
public PathSasPermission setMovePermission(boolean hasMovePermission)
Sets the move permission status.
Parameters:
Returns:
setReadPermission
public PathSasPermission setReadPermission(boolean hasReadPermission)
Sets the read permission status.
Parameters:
Returns:
setWritePermission
public PathSasPermission 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:
PathSasPermission.toString()Returns:
String
which represents the PathSasPermission
.Applies to
Azure SDK for Java