Class ScimFilter

java.lang.Object
org.mockserver.scim.ScimFilter

public class ScimFilter extends Object
Minimal SCIM filter evaluator supporting a single attr op "value" comparison over top-level attributes. Supported operators: eq, co, sw, and the unary presence operator pr.

Deliberately scoped for v1: compound expressions (and/or/not), value-paths, and the ordered operators (ge/le/gt/lt) are not supported. A filter referencing an unknown attribute matches nothing.

  • Method Details

    • parse

      public static ScimFilter parse(String filter)
      Parses a SCIM filter string.
      Returns:
      the parsed filter, or null if filter is blank
      Throws:
      IllegalArgumentException - if the filter is non-blank but unparseable
    • apply

      public List<com.fasterxml.jackson.databind.node.ObjectNode> apply(List<com.fasterxml.jackson.databind.node.ObjectNode> resources)
      Applies this filter to the supplied resources, returning only the matching ones (in order).
    • matches

      public boolean matches(com.fasterxml.jackson.databind.node.ObjectNode resource)
    • getAttribute

      public String getAttribute()
    • getOperator

      public String getOperator()
    • getValue

      public String getValue()
    • isPresence

      public boolean isPresence()