Package com.orchestranetworks.service
Class AccessPermission
java.lang.Object
com.orchestranetworks.service.AccessPermission
Defines the permission to see and modify a resource. The possible states are:
- hidden – the resource is not displayed;
- read-only – the resource is shown but it cannot be modified; optionally a message may tell why;
- read-write – the resource is displayed and it may be modified;
-
Method Summary
Modifier and TypeMethodDescriptionchar
getFlag()
Persistent flag that identifies this permission.Persistent flag that identifies this permission.static AccessPermission
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.getLabel()
Returns a developer-friendly string label.static AccessPermission
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.Optionally defined if this state is set as 'readOnly' or as 'hidden' and a specific reason is provided.static AccessPermission
Factory method specifying that a resource can be displayed and modified.boolean
isHidden()
boolean
boolean
max
(AccessPermission anotherPermission) Returns the least restrictive between this permission and the permission given as an argument.max
(Supplier<AccessPermission> anotherPermissionSupplier) Returns the least restrictive between this permission, and the permission supplied by the specified function.min
(AccessPermission anotherPermission) Returns the most restrictive between this permission and the permission given as an argument.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
Factory method.toString()
-
Method Details
-
parseFlag
Factory method. The methodgetFlagString()
returns the specified argument.- See Also:
-
parseFlag
Factory method. The methodgetFlag()
returns the specified argument.- See Also:
-
getReadWrite
Factory method specifying that a resource can be displayed and modified. -
getReadOnly
Factory method specifying that a resource can be displayed but not modified. -
getReadOnly
Factory method specifying that a resource can be displayed but it cannot modified. The reason why resource cannot modified may be provided to the user.Warning: the message is not always displayed in the current version of EBX®.
-
getHidden
Factory method specifying that a resource can neither be modified nor displayed. -
getHidden
Factory method specifying that a resource can not be modified and is not displayed.The reason specified will be exploited in a future release.
-
toString
-
isReadWrite
public boolean isReadWrite() -
isReadOnly
public boolean isReadOnly() -
isHidden
public boolean isHidden() -
getReadOnlyReason
Optionally defined if this state is set as 'readOnly' or as 'hidden' and a specific reason is provided. -
min
Returns the most restrictive between this permission and the permission given as an argument. -
min
Returns the most restrictive between this permission, and the permission supplied by the specified function.Note that when this permission is hidden, the supplier function will not be called for performance.
- Since:
- 6.0.0
-
max
Returns the least restrictive between this permission and the permission given as an argument. -
max
Returns the least restrictive between this permission, and the permission supplied by the specified function.Note that when this permission is read-write, the supplier function will not be called for performance.
- Since:
- 6.0.0
-
getFlag
public char getFlag()Persistent flag that identifies this permission. -
getFlagString
Persistent flag that identifies this permission.It returns the same content as
getFlag()
. -
getLabel
Returns a developer-friendly string label.
-