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