Sdílet prostřednictvím


FileSystemSasPermission Class

  • java.lang.Object
    • com.azure.storage.file.datalake.sas.FileSystemSasPermission

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 FileSystemSasPermission object with all fields set to false.

Method Summary

Modifier and Type Method and Description
boolean hasAddPermission()
boolean hasCreatePermission()
boolean hasDeletePermission()
boolean hasExecutePermission()
boolean hasListPermission()
boolean hasManageAccessControlPermission()
boolean hasManageOwnershipPermission()
boolean hasMovePermission()
boolean hasReadPermission()
boolean hasWritePermission()
static FileSystemSasPermission parse(String permissionString)

Creates an FileSystemSasPermission from the specified permissions string.

FileSystemSasPermission setAddPermission(boolean hasAddPermission)

Sets the add permission status.

FileSystemSasPermission setCreatePermission(boolean hasCreatePermission)

Sets the create permission status.

FileSystemSasPermission setDeletePermission(boolean hasDeletePermission)

Sets the delete permission status.

FileSystemSasPermission setExecutePermission(boolean hasExecutePermission)

Sets the execute permission status.

FileSystemSasPermission setListPermission(boolean hasListPermission)

Sets the list permission status.

FileSystemSasPermission setManageAccessControlPermission(boolean hasManageAccessControlPermission)

Sets the manage access control permission status.

FileSystemSasPermission setManageOwnershipPermission(boolean hasManageOwnershipPermission)

Sets the manage ownership permission status.

FileSystemSasPermission setMovePermission(boolean hasMovePermission)

Sets the move permission status.

FileSystemSasPermission setReadPermission(boolean hasReadPermission)

Sets the read permission status.

FileSystemSasPermission setWritePermission(boolean hasWritePermission)

Sets the write permission status.

String toString()

Converts the given permissions to a String.

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:

the add permission status

hasCreatePermission

public boolean hasCreatePermission()

Returns:

the create permission status

hasDeletePermission

public boolean hasDeletePermission()

Returns:

the delete permission status

hasExecutePermission

public boolean hasExecutePermission()

Returns:

the execute permission status.

hasListPermission

public boolean hasListPermission()

Returns:

the list permission status

hasManageAccessControlPermission

public boolean hasManageAccessControlPermission()

Returns:

the manage access control permission status.

hasManageOwnershipPermission

public boolean hasManageOwnershipPermission()

Returns:

the manage ownership permission status.

hasMovePermission

public boolean hasMovePermission()

Returns:

the move permission status.

hasReadPermission

public boolean hasReadPermission()

Returns:

the read permission status

hasWritePermission

public boolean hasWritePermission()

Returns:

the write permission status

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:

permissionString - A String which represents the FileSystemSasPermission.

Returns:

A FileSystemSasPermission generated from the given String.

setAddPermission

public FileSystemSasPermission setAddPermission(boolean hasAddPermission)

Sets the add permission status.

Parameters:

hasAddPermission - Permission status to set

Returns:

the updated FileSystemSasPermission object

setCreatePermission

public FileSystemSasPermission setCreatePermission(boolean hasCreatePermission)

Sets the create permission status.

Parameters:

hasCreatePermission - Permission status to set

Returns:

the updated FileSystemSasPermission object

setDeletePermission

public FileSystemSasPermission setDeletePermission(boolean hasDeletePermission)

Sets the delete permission status.

Parameters:

hasDeletePermission - Permission status to set

Returns:

the updated FileSystemSasPermission object

setExecutePermission

public FileSystemSasPermission setExecutePermission(boolean hasExecutePermission)

Sets the execute permission status.

Parameters:

hasExecutePermission - Permission status to set

Returns:

the updated FileSystemSasPermission object.

setListPermission

public FileSystemSasPermission setListPermission(boolean hasListPermission)

Sets the list permission status.

Parameters:

hasListPermission - Permission status to set

Returns:

the updated FileSystemSasPermission object

setManageAccessControlPermission

public FileSystemSasPermission setManageAccessControlPermission(boolean hasManageAccessControlPermission)

Sets the manage access control permission status.

Parameters:

hasManageAccessControlPermission - Permission status to set

Returns:

the updated FileSystemSasPermission object.

setManageOwnershipPermission

public FileSystemSasPermission setManageOwnershipPermission(boolean hasManageOwnershipPermission)

Sets the manage ownership permission status.

Parameters:

hasManageOwnershipPermission - Permission status to set

Returns:

the updated FileSystemSasPermission object.

setMovePermission

public FileSystemSasPermission setMovePermission(boolean hasMovePermission)

Sets the move permission status.

Parameters:

hasMovePermission - Permission status to set

Returns:

the updated FileSystemSasPermission object.

setReadPermission

public FileSystemSasPermission setReadPermission(boolean hasReadPermission)

Sets the read permission status.

Parameters:

hasReadPermission - Permission status to set

Returns:

the updated FileSystemSasPermission object

setWritePermission

public FileSystemSasPermission setWritePermission(boolean hasWritePermission)

Sets the write permission status.

Parameters:

hasWritePermission - Permission status to set

Returns:

the updated FileSystemSasPermission object

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:

A String which represents the FileSystemSasPermission.

Applies to