Package org.incendo.cloud.permission
Interface Permission
- All Known Subinterfaces:
PredicatePermission<C>
- All Known Implementing Classes:
AndPermission,OrPermission
A command permission representation.
The meaning of a permission is dependent on the platform, and the same permission node may represent different things in different environments.
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PermissionallOf(@NonNull Collection<@NonNull Permission> permissions) Creates a new AND permission that evaluates totrueif all the givenpermissionsevaluate totrue.static @NonNull PermissionallOf(@NonNull Permission @NonNull ... permissions) Creates a new AND permission that evaluates totrueif all the givenpermissionsevaluate totrue.default @NonNull Permissionand(@NonNull Permission other) Returns a permission that matches this permission and theotherpermission.default @NonNull Permissionand(@NonNull Permission @NonNull ... other) Returns a permission that matches this permission and all of theotherpermissions.static @NonNull PermissionanyOf(@NonNull Collection<@NonNull Permission> permissions) Create a new OR permission that evaluates totrueif any of the givenpermissionsevaluates totrue.static @NonNull PermissionanyOf(@NonNull Permission @NonNull ... permissions) Create a new OR permission that evaluates totrueif any of the givenpermissionsevaluates totrue.static @NonNull Permissionempty()Returns an empty permission node.default booleanisEmpty()Returns true if a check for this permission should and will always return true.static @NonNull PermissionReturns a simple permission that is represented by the givenpermissionstring.default @NonNull Permissionor(@NonNull Permission other) Returns a permission that matches either this permission or theotherpermission.default @NonNull Permissionor(@NonNull Permission @NonNull ... other) Returns a permission that matches either this permission or any of theotherpermissions.static @NonNull Permissionpermission(@NonNull String permission) Returns a simple permission that is represented by the givenpermissionstring.default @NonNull Collection<@NonNull Permission> Returns the inner permission nodes of this node.Returns the string representation of the permission.
-
Field Details
-
EMPTY
-
-
Method Details
-
permission
Returns a simple permission that is represented by the givenpermissionstring.- Parameters:
permission- permission string- Returns:
- the permission
-
of
Returns a simple permission that is represented by the givenpermissionstring.- Parameters:
permission- permission string- Returns:
- the permission
-
empty
Returns an empty permission node.- Returns:
- an empty permission node
-
allOf
Creates a new AND permission that evaluates totrueif all the givenpermissionsevaluate totrue.- Parameters:
permissions- permissions to join- Returns:
- the permission
-
allOf
Creates a new AND permission that evaluates totrueif all the givenpermissionsevaluate totrue.- Parameters:
permissions- permissions to join- Returns:
- the permission
-
anyOf
Create a new OR permission that evaluates totrueif any of the givenpermissionsevaluates totrue.- Parameters:
permissions- permissions to join- Returns:
- the permission
-
anyOf
Create a new OR permission that evaluates totrueif any of the givenpermissionsevaluates totrue.- Parameters:
permissions- permissions to join- Returns:
- the permission
-
permissions
Returns the inner permission nodes of this node.- Returns:
- the inner permission nodes
-
permissionString
Returns the string representation of the permission.- Returns:
- string representation
-
isEmpty
Returns true if a check for this permission should and will always return true.- Returns:
- true if this permission is empty, otherwise false
-
or
Returns a permission that matches either this permission or theotherpermission.- Parameters:
other- the other permission to test- Returns:
- a new
orpermission
-
or
Returns a permission that matches either this permission or any of theotherpermissions.- Parameters:
other- the other permission to test- Returns:
- a new
orpermission
-
and
Returns a permission that matches this permission and theotherpermission.- Parameters:
other- the other permission to test- Returns:
- a new
andpermission
-
and
Returns a permission that matches this permission and all of theotherpermissions.- Parameters:
other- the other permission to test- Returns:
- a new
andpermission
-