Class FilterResourceResolver

java.lang.Object
de.captaingoldfish.scim.sdk.server.filter.resources.FilterResourceResolver

public class FilterResourceResolver extends Object
author Pascal Knueppel
created at: 20.10.2019 - 20:17

This class is used to use a FilterNode tree on a resource list to filter all resources that match the given filter expression
  • Constructor Details

    • FilterResourceResolver

      public FilterResourceResolver()
  • Method Details

    • filterResources

      public static <T extends ResourceNode> List<T> filterResources(ServiceProvider serviceProvider, List<T> resources, FilterNode filterNode)
      filters the given resources based on the filternode
      Type Parameters:
      T - a ResourceNode type
      Parameters:
      resources - the resources that must be filtered
      filterNode - the filter node that holds the information how the resources should be filtered
      Returns:
      the filtered resources
    • checkValueEquality

      protected static boolean checkValueEquality(com.fasterxml.jackson.databind.JsonNode attributeNode, AttributeExpressionLeaf attributeExpressionLeaf)
      checks if the given simple attribute node does match the given filter expression
      Parameters:
      attributeNode - a simple attribute node with primitive values. This might be a json array with primitives or a json primitive
      attributeExpressionLeaf - the expression leaf that describes the node
      Returns:
      true if the attribute matches the expression, false else