public final class AccessPermission extends Object
Modifier and Type | Method and Description |
---|---|
char |
getFlag()
Persistent flag that identifies this permission.
|
String |
getFlagString()
Persistent flag that identifies this permission.
|
static AccessPermission |
getHidden()
Factory method specifying that a resource can neither be modified nor displayed.
|
static AccessPermission |
getHidden(UserMessage aReason)
Factory method specifying that a resource can not be modified
and is not displayed.
|
String |
getLabel()
Returns a developer-friendly string label.
|
static AccessPermission |
getReadOnly()
Factory method specifying that a resource can be displayed but not modified.
|
static AccessPermission |
getReadOnly(UserMessage aReason)
Factory method specifying that a resource can be displayed but it cannot modified.
|
UserMessage |
getReadOnlyReason()
Optionally defined if this state is set as 'readOnly' or as 'hidden' and a specific reason is provided.
|
static AccessPermission |
getReadWrite()
Factory method specifying that a resource can be displayed and modified.
|
boolean |
isHidden() |
boolean |
isReadOnly() |
boolean |
isReadWrite() |
AccessPermission |
max(AccessPermission anotherPermission)
Returns the least restrictive between this permission and the permission given
as an argument.
|
AccessPermission |
max(Supplier<AccessPermission> anotherPermissionSupplier)
Returns the least restrictive between this permission,
and the permission supplied by the specified function.
|
AccessPermission |
min(AccessPermission anotherPermission)
Returns the most restrictive between this permission and the permission given
as an argument.
|
AccessPermission |
min(Supplier<AccessPermission> anotherPermissionSupplier)
Returns the most restrictive between this permission,
and the permission supplied by the specified function.
|
static AccessPermission |
parseFlag(char accessFlag)
Factory method.
|
static AccessPermission |
parseFlag(String accessFlag)
Factory method.
|
String |
toString() |
public static AccessPermission parseFlag(String accessFlag)
getFlagString()
returns the specified argument.parseFlag(char)
public static AccessPermission parseFlag(char accessFlag)
getFlag()
returns the specified argument.parseFlag(String)
public static AccessPermission getReadWrite()
public static AccessPermission getReadOnly()
public static AccessPermission getReadOnly(UserMessage aReason)
Warning: the message is not always displayed in the current version of EBX®.
public static AccessPermission getHidden()
public static AccessPermission getHidden(UserMessage aReason)
The reason specified will be exploited in a future release.
public boolean isReadWrite()
public boolean isReadOnly()
public boolean isHidden()
public UserMessage getReadOnlyReason()
getHidden(UserMessage)
,
getReadOnly(UserMessage)
public AccessPermission min(AccessPermission anotherPermission)
public AccessPermission min(Supplier<AccessPermission> anotherPermissionSupplier)
Note that when this permission is hidden, the supplier function will not be called for performance.
public AccessPermission max(AccessPermission anotherPermission)
public AccessPermission max(Supplier<AccessPermission> anotherPermissionSupplier)
Note that when this permission is read-write, the supplier function will not be called for performance.
public char getFlag()
public String getFlagString()
It returns the same content as getFlag()
.
public String getLabel()