Interface OperationFilter<O extends Operation>

Type Parameters:
O - the operation type
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 OperationFilter<O extends Operation>
Strategy class that can be used to filter operations.
Since:
3.4.0
Author:
Andy Wilkinson
  • Method Details

    • match

      boolean match(O operation, EndpointId endpointId, Access defaultAccess)
      Return true if the filter matches.
      Parameters:
      operation - the operation to check
      endpointId - the ID of the endpoint to which the operation belongs
      defaultAccess - the default permitted level of access to the endpoint
      Returns:
      true if the filter matches
    • byAccess

      static <O extends Operation> OperationFilter<O> byAccess(EndpointAccessResolver accessResolver)
      Return an OperationFilter that filters based on the allowed access as determined by an access resolver.
      Type Parameters:
      O - the operation type
      Parameters:
      accessResolver - the access resolver
      Returns:
      a new OperationFilter