Class AllPermissionImpl
java.lang.Object
org.tentackle.security.permissions.AbstractPermission
org.tentackle.security.permissions.AllPermissionImpl
- All Implemented Interfaces:
Comparable<Permission>, Permission, AllPermission
@PermissionService(AllPermission.class)
public final class AllPermissionImpl
extends AbstractPermission
implements AllPermission
Permission that represents all other permissions.
- Author:
- harald
-
Field Summary
Fields inherited from interface AllPermission
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether this permission applies to given class or instances of it.getName()Gets the unique name of the permission.
The name must conform to the rules of a java identifier, must be unique among all permissions and should be reasonably short.booleanisAllowedBy(Class<?>... permissions) Checks if this requested permission implements at least one of the given permissions.booleanisDeniedBy(Class<?>... permissions) Checks at least one of the given permissions implements this requested permission.Methods inherited from class AbstractPermission
compareTo, equals, getDescription, getPermissionInterface, hashCode, toStringMethods inherited from interface Comparable
compareToMethods inherited from interface Permission
getDescription, getPermissionInterface
-
Constructor Details
-
AllPermissionImpl
public AllPermissionImpl()Creates the "all" permission.
-
-
Method Details
-
getName
Description copied from interface:PermissionGets the unique name of the permission.
The name must conform to the rules of a java identifier, must be unique among all permissions and should be reasonably short.- Specified by:
getNamein interfacePermission- Returns:
- the name, never null
-
isAllowedBy
Description copied from interface:PermissionChecks if this requested permission implements at least one of the given permissions.- Specified by:
isAllowedByin interfacePermission- Overrides:
isAllowedByin classAbstractPermission- Parameters:
permissions- the configured permissions- Returns:
- true if matches
-
isDeniedBy
Description copied from interface:PermissionChecks at least one of the given permissions implements this requested permission.- Specified by:
isDeniedByin interfacePermission- Overrides:
isDeniedByin classAbstractPermission- Parameters:
permissions- the configured permissions- Returns:
- true if matches
-
appliesTo
Description copied from interface:PermissionDetermines whether this permission applies to given class or instances of it.- Specified by:
appliesToin interfacePermission- Parameters:
clazz- the class- Returns:
- true if applies
-