public final class BasePermission extends Object implements Permission
| Modifier and Type | Field and Description |
|---|---|
static Permission |
ADMINISTRATION |
static Permission |
CREATE |
static Permission |
DELETE |
static Permission |
READ |
static Permission |
WRITE |
RESERVED_OFF, RESERVED_ON, THIRTY_TWO_RESERVED_OFF| Modifier and Type | Method and Description |
|---|---|
static Permission |
buildFromMask(int mask)
Dynamically creates a
CumulativePermission or BasePermission representing the
active bits in the passed mask. |
static Permission[] |
buildFromMask(int[] masks) |
static Permission |
buildFromName(String name) |
static Permission[] |
buildFromName(String[] names) |
boolean |
equals(Object arg0) |
int |
getMask()
Returns the bits that represents the permission.
|
String |
getPattern()
Returns a 32-character long bit pattern
String representing this permission. |
int |
hashCode() |
String |
toString() |
public static final Permission READ
public static final Permission WRITE
public static final Permission CREATE
public static final Permission DELETE
public static final Permission ADMINISTRATION
public static Permission buildFromMask(int mask)
CumulativePermission or BasePermission representing the
active bits in the passed mask.mask - to buildpublic static Permission[] buildFromMask(int[] masks)
public static Permission buildFromName(String name)
public static Permission[] buildFromName(String[] names)
public int getMask()
PermissiongetMask in interface Permissionpublic String getPattern()
PermissionString representing this permission.
Implementations are free to format the pattern as they see fit, although under no circumstances may
Permission.RESERVED_OFF or Permission.RESERVED_ON be used within the pattern. An exemption is in the case of
Permission.RESERVED_OFF which is used to denote a bit that is off (clear).
Implementations may also elect to use Permission.RESERVED_ON internally for computation purposes,
although this method may not return any String containing Permission.RESERVED_ON.
The returned String must be 32 characters in length.
This method is only used for user interface and logging purposes. It is not used in any permission calculations. Therefore, duplication of characters within the output is permitted.
getPattern in interface PermissionCopyright © 2021. All rights reserved.