Interface PermissionResolver<S,R>


public interface PermissionResolver<S,R>
Resolves the permissions for a particular type of subjects and resources.
Author:
avasquez
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the global permission (that applies to any or all resources) associated to the given subject.
    getPermission(S subject, R resource)
    Returns the permission associated to the given subject and resource.
  • Method Details

    • getGlobalPermission

      Permission getGlobalPermission(S subject) throws PermissionException
      Returns the global permission (that applies to any or all resources) associated to the given subject.
      Parameters:
      subject - the subject
      Returns:
      the global permission, or null if no permission found
      Throws:
      PermissionException
    • getPermission

      Permission getPermission(S subject, R resource) throws PermissionException
      Returns the permission associated to the given subject and resource.
      Parameters:
      subject - the subject (not null)
      resource - the protected resource or ID/IDs of the protected resource (not null).
      Returns:
      the object/subject permission, or null if no permission found
      Throws:
      PermissionException