Interface ListGuard

All Known Implementing Classes:
AbstractEntityDocsGuardFactory.AbstractEntityDocsGuard, AbstractListGuard, DefaultListGuard, DelegatingEntityDocsListGuard, MixedListGuard

public interface ListGuard
The ListGuard protects a List of objects. Only objects of the same type (supported by the same security domain) should be used together. Using a ListGuard is more efficient when evaluation permissions and conditions than using multiple Guard instances.
  • Method Details

    • getPrincipal

      Principal getPrincipal()
    • getSecured

      List<?> getSecured()
      The objects this guard is protecting.
    • evaluatePermissions

      Guard.Decision[] evaluatePermissions(Permission permission)
      Evaluates a permission. This method returns an Guard.Decision providing some more information about *why* a permission is granted or denied.
      permission - The permission to evaluate.
      An Guard.Decision.
    • checkPermission

      void checkPermission(Permission permission) throws UnauthorizedException
      UnauthorizedException - when the permission is not granted to at least one object in this list guard
    • getSecurityContext

      SecurityContext getSecurityContext()
    • toGuard

      Guard toGuard()
      Returns a Guard instance based on this ListGuard. This is only supported if this list guard contains exactly one object.