Class CaseInsensitiveAttributeExtractor
- java.lang.Object
-
- de.captaingoldfish.scim.sdk.common.utils.AttributeExtractor
-
- de.captaingoldfish.scim.sdk.common.utils.CaseInsensitiveAttributeExtractor
-
public class CaseInsensitiveAttributeExtractor extends AttributeExtractor
author Pascal Knueppel
created at: 23.07.2022 - 13:22
used to extract an attribute from a json document case-insensitive
-
-
Field Summary
-
Fields inherited from class de.captaingoldfish.scim.sdk.common.utils.AttributeExtractor
jsonDocument
-
-
Constructor Summary
Constructors Constructor Description CaseInsensitiveAttributeExtractor(com.fasterxml.jackson.databind.JsonNode jsonDocument)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<com.fasterxml.jackson.databind.JsonNode>getAttribute(SchemaAttribute schemaAttribute)will try to extract an attribute from the json document case-insensitive:
try to extract it by its correct attribute name from the json document if not found try to extract it from theattributeMapif not found iterate over the document and store each found element with its key value in lowercase in theattributeMapuntil found
-
-
-
Method Detail
-
getAttribute
public Optional<com.fasterxml.jackson.databind.JsonNode> getAttribute(SchemaAttribute schemaAttribute)
will try to extract an attribute from the json document case-insensitive:
- try to extract it by its correct attribute name from the json document
- if not found try to extract it from the
attributeMap - if not found iterate over the document and store each found element with its key value in lowercase in
the
attributeMapuntil found
- Specified by:
getAttributein classAttributeExtractor- Parameters:
schemaAttribute- the attribute that should be extracted from the document- Returns:
- the attribute or an empty if not found
-
-