Interface AccessPrivilegeValidator

All Known Implementing Classes:
ModuleAccessValidator, PermissionAccessValidator

public interface AccessPrivilegeValidator
Interface defining the contract for an Access Grant Validator. An Access Grant Validator is responsible for determining whether access to a certain bean is granted based on specific criteria.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(Class<?> cls)
    Determines whether the given bean class can be handled by this validator.
    default boolean
    Determines whether the given bean can be handled by this validator.
    validate(Class<?> cls)
    Determines whether access to the given object class is granted based on specific criteria.
    Determines whether access to the given object is granted based on specific criteria.
  • Method Details

    • canHandle

      default boolean canHandle(Object bean)
      Determines whether the given bean can be handled by this validator.
      Parameters:
      bean - the object to be checked (might be null)
      Returns:
      true if the bean can be handled, false otherwise
    • canHandle

      boolean canHandle(Class<?> cls)
      Determines whether the given bean class can be handled by this validator.
      Parameters:
      cls - the class to be checked (might be null)
      Returns:
      true if the bean can be handled, false otherwise
    • validate

      default PrivilegeViolation validate(Object bean)
      Determines whether access to the given object is granted based on specific criteria.
      Parameters:
      bean - the object to be checked for access (might be null)
      Returns:
      a PrivilegeViolation instance if there is any violation or null otherwise
    • validate

      PrivilegeViolation validate(Class<?> cls)
      Determines whether access to the given object class is granted based on specific criteria.
      Parameters:
      cls - the class to be checked for access (might be null)
      Returns:
      a PrivilegeViolation instance if there is any violation or null otherwise