Class FilterResourceResolver
java.lang.Object
de.captaingoldfish.scim.sdk.server.filter.resources.FilterResourceResolver
author Pascal Knueppel
created at: 20.10.2019 - 20:17
This class is used to use a
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancheckValueEquality(com.fasterxml.jackson.databind.JsonNode attributeNode, AttributeExpressionLeaf attributeExpressionLeaf) checks if the given simple attribute node does match the given filter expressionstatic <T extends ResourceNode>
List<T>filterResources(ServiceProvider serviceProvider, List<T> resources, FilterNode filterNode) filters the given resources based on the filternode
-
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- aResourceNodetype- Parameters:
resources- the resources that must be filteredfilterNode- 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 primitiveattributeExpressionLeaf- the expression leaf that describes the node- Returns:
- true if the attribute matches the expression, false else
-