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
  • Constructor Details

    • AllPermissionImpl

      public AllPermissionImpl()
      Creates the "all" permission.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Permission
      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.
      Specified by:
      getName in interface Permission
      Returns:
      the name, never null
    • isAllowedBy

      public boolean isAllowedBy(Class<?>... permissions)
      Description copied from interface: Permission
      Checks if this requested permission implements at least one of the given permissions.
      Specified by:
      isAllowedBy in interface Permission
      Overrides:
      isAllowedBy in class AbstractPermission
      Parameters:
      permissions - the configured permissions
      Returns:
      true if matches
    • isDeniedBy

      public boolean isDeniedBy(Class<?>... permissions)
      Description copied from interface: Permission
      Checks at least one of the given permissions implements this requested permission.
      Specified by:
      isDeniedBy in interface Permission
      Overrides:
      isDeniedBy in class AbstractPermission
      Parameters:
      permissions - the configured permissions
      Returns:
      true if matches
    • appliesTo

      public boolean appliesTo(Class<?> clazz)
      Description copied from interface: Permission
      Determines whether this permission applies to given class or instances of it.
      Specified by:
      appliesTo in interface Permission
      Parameters:
      clazz - the class
      Returns:
      true if applies