Interface PermissionResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PermissionResolver
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Whether results from this resolver may be cached by the holder until the next invalidation.
    Resolves a node for a holder.
    default int
    Ordering weight; higher weights are consulted first.
  • Method Details

    • resolve

      TriState resolve(PermissionHolder holder, PermissionNode node)
      Resolves a node for a holder.
      Parameters:
      holder - the holder
      node - the node
      Returns:
      the decided state, or TriState.NOT_SET to defer to the next resolver
    • weight

      default int weight()
      Ordering weight; higher weights are consulted first. Defaults to 0.
      Returns:
      the weight
    • cacheable

      default boolean cacheable()
      Whether results from this resolver may be cached by the holder until the next invalidation. Return false for back-ends whose answers can change without going through PermissionHolder.invalidatePermissions().
      Returns:
      true if results are cacheable