Class CaseInsensitiveAttributeExtractor
java.lang.Object
de.captaingoldfish.scim.sdk.common.utils.AttributeExtractor
de.captaingoldfish.scim.sdk.common.utils.CaseInsensitiveAttributeExtractor
author Pascal Knueppel
created at: 23.07.2022 - 13:22
used to extract an attribute from a json document case-insensitive
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
ConstructorsConstructorDescriptionCaseInsensitiveAttributeExtractor(com.fasterxml.jackson.databind.JsonNode jsonDocument) -
Method Summary
Modifier and TypeMethodDescriptionOptional<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
-
Constructor Details
-
CaseInsensitiveAttributeExtractor
public CaseInsensitiveAttributeExtractor(com.fasterxml.jackson.databind.JsonNode jsonDocument)
-
-
Method Details
-
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
-