Class ScimObjectNode
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializable.Base
-
- com.fasterxml.jackson.databind.JsonNode
-
- com.fasterxml.jackson.databind.node.BaseJsonNode
-
- com.fasterxml.jackson.databind.node.ContainerNode<com.fasterxml.jackson.databind.node.ObjectNode>
-
- com.fasterxml.jackson.databind.node.ObjectNode
-
- de.captaingoldfish.scim.sdk.common.resources.base.ScimObjectNode
-
- All Implemented Interfaces:
com.fasterxml.jackson.core.TreeNode
,com.fasterxml.jackson.databind.JsonSerializable
,com.fasterxml.jackson.databind.node.JsonNodeCreator
,ScimNode
,Serializable
,Iterable<com.fasterxml.jackson.databind.JsonNode>
- Direct Known Subclasses:
AbstractSchemasHolder
,BulkConfig
,BulkRequestOperation
,BulkResponseOperation
,ChangePasswordConfig
,EnterpriseUser
,ETagConfig
,FilterConfig
,Manager
,Meta
,MultiComplexNode
,Name
,PatchConfig
,PatchRequestOperation
,SchemaAttribute
,SortConfig
public class ScimObjectNode extends com.fasterxml.jackson.databind.node.ObjectNode implements ScimNode
author Pascal Knueppel
created at: 05.10.2019 - 20:10
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScimObjectNode()
ScimObjectNode(SchemaAttribute schemaAttribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends com.fasterxml.jackson.databind.JsonNode>
voidaddAttribute(String attributeName, T attributeValue)
adds a single entry to the array type attributeprotected <T extends com.fasterxml.jackson.databind.node.ObjectNode>
List<T>getArrayAttribute(String attributeName, Class<T> type)
extracts an object type attributeprotected Optional<Boolean>
getBooleanAttribute(String attributeName)
extracts a boolean type attributeprotected Optional<Instant>
getDateTimeAttribute(String attributeName)
extracts a dateTime type attributeprotected Optional<Double>
getDoubleAttribute(String attributeName)
extracts a double type attributeprotected Optional<Integer>
getIntegerAttribute(String attributeName)
extracts an integer type attributeprotected Optional<Long>
getLongAttribute(String attributeName)
extracts a long type attributeprotected <T extends com.fasterxml.jackson.databind.node.ObjectNode>
Optional<T>getObjectAttribute(String attributeName, Class<T> type)
extracts an object type attributeprotected List<String>
getSimpleArrayAttribute(String attributeName)
extracts a simple attribute typeprotected <T> List<T>
getSimpleArrayAttribute(String attributeName, Class<T> type)
extracts a simple attribute typeprotected Set<String>
getSimpleArrayAttributeSet(String attributeName)
extracts a simple attribute typeprotected <T> Set<T>
getSimpleArrayAttributeSet(String attributeName, Class<T> type)
extracts a simple attribute typeprotected Optional<String>
getStringAttribute(String attributeName)
extracts a string type attributeprotected <T extends com.fasterxml.jackson.databind.node.TextNode>
Optional<T>getStringAttribute(String attributeName, Class<T> type)
extracts aTextNode
type attributeboolean
isEmpty()
override method for usage with wildfly 18 that still uses jackson 2.9.xprotected void
setAttribute(String attributeName, com.fasterxml.jackson.databind.node.ObjectNode attributeValue)
adds or removes an object type attributeprotected void
setAttribute(String attributeName, Boolean attributeValue)
adds or removes a boolean type attributeprotected void
setAttribute(String attributeName, Double attributeValue)
adds or removes a double type attributeprotected void
setAttribute(String attributeName, Integer attributeValue)
adds or removes an integer type attributeprotected void
setAttribute(String attributeName, Long attributeValue)
adds or removes a long type attributeprotected void
setAttribute(String attributeName, String attributeValue)
adds or removes a string type attributeprotected <T extends com.fasterxml.jackson.databind.JsonNode>
voidsetAttribute(String attributeName, List<T> attributeValue)
adds or removes an array type attributeprotected <T> void
setAttributeList(String attributeName, List<T> attributeValue)
adds or removes an array type attributeprotected void
setDateTimeAttribute(String attributeName, Instant attributeValue)
adds or removes a dateTime type attribute by default the JSON String representation will keep DEFAULT_FRACTIONALS_TO_KEEP fractionals i.e. 1970-01-01T00:00:00.000Zprotected void
setDateTimeAttribute(String attributeName, Instant attributeValue, int fractionalDigits)
adds or removes a dateTime type attribute including the given fractionalDigits inside the JSON TextNodeprotected void
setDateTimeAttribute(String attributeName, LocalDateTime attributeValue)
adds or removes a dateTime type attributeprotected void
setDateTimeAttribute(String attributeName, OffsetDateTime attributeValue)
adds or removes a dateTime type attributeprotected void
setStringAttributeList(String attributeName, List<String> attributeValue)
adds or removes an array type attributeprotected void
setStringAttributeList(String attributeName, Set<String> attributeValue)
adds or removes an array type attributeString
toPrettyString()
override method for usage with wildfly 18 that still uses jackson 2.9.xString
toString()
override method for usage with wildfly 18 that still uses jackson 2.9.x-
Methods inherited from class com.fasterxml.jackson.databind.node.ObjectNode
_at, _childrenEqual, _put, asToken, deepCopy, elements, equals, equals, fieldNames, fields, findParent, findParents, findValue, findValues, findValuesAsText, get, get, getNodeType, hashCode, isEmpty, isObject, path, path, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, putArray, putNull, putObject, putPOJO, putRawValue, remove, remove, removeAll, replace, required, retain, retain, serialize, serializeWithType, set, setAll, setAll, size, with, withArray, without, without
-
Methods inherited from class com.fasterxml.jackson.databind.node.ContainerNode
arrayNode, arrayNode, asText, binaryNode, binaryNode, booleanNode, missingNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, pojoNode, rawValueNode, textNode
-
Methods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode
findPath, numberType, required, traverse, traverse
-
Methods inherited from class com.fasterxml.jackson.databind.JsonNode
_reportRequiredViolation, _this, asBoolean, asBoolean, asDouble, asDouble, asInt, asInt, asLong, asLong, asText, at, at, bigIntegerValue, binaryValue, booleanValue, canConvertToInt, canConvertToLong, decimalValue, doubleValue, findParents, findValues, findValuesAsText, floatValue, has, has, hasNonNull, hasNonNull, intValue, isArray, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isPojo, isShort, isTextual, isValueNode, iterator, longValue, numberValue, require, requiredAt, requiredAt, requireNonNull, shortValue, textValue
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface de.captaingoldfish.scim.sdk.common.resources.base.ScimNode
getAttributeDescription, getAttributeName, getCanonicalValues, getMutability, getReferenceTypes, getReturned, getSchemaAttribute, getScimNodeName, getUniqueness, getValueType, isCaseExact, isMultiValued, isRequired
-
-
-
-
Constructor Detail
-
ScimObjectNode
public ScimObjectNode()
-
ScimObjectNode
public ScimObjectNode(SchemaAttribute schemaAttribute)
-
-
Method Detail
-
getStringAttribute
protected Optional<String> getStringAttribute(String attributeName)
extracts a string type attribute
-
getBooleanAttribute
protected Optional<Boolean> getBooleanAttribute(String attributeName)
extracts a boolean type attribute
-
getLongAttribute
protected Optional<Long> getLongAttribute(String attributeName)
extracts a long type attribute
-
getIntegerAttribute
protected Optional<Integer> getIntegerAttribute(String attributeName)
extracts an integer type attribute
-
getDoubleAttribute
protected Optional<Double> getDoubleAttribute(String attributeName)
extracts a double type attribute
-
getDateTimeAttribute
protected Optional<Instant> getDateTimeAttribute(String attributeName)
extracts a dateTime type attribute
-
getStringAttribute
protected <T extends com.fasterxml.jackson.databind.node.TextNode> Optional<T> getStringAttribute(String attributeName, Class<T> type)
extracts aTextNode
type attribute
-
getObjectAttribute
protected <T extends com.fasterxml.jackson.databind.node.ObjectNode> Optional<T> getObjectAttribute(String attributeName, Class<T> type)
extracts an object type attribute
-
getArrayAttribute
protected <T extends com.fasterxml.jackson.databind.node.ObjectNode> List<T> getArrayAttribute(String attributeName, Class<T> type)
extracts an object type attribute
-
getSimpleArrayAttribute
protected List<String> getSimpleArrayAttribute(String attributeName)
extracts a simple attribute type- Parameters:
attributeName
- the name of the array attribute
-
getSimpleArrayAttribute
protected <T> List<T> getSimpleArrayAttribute(String attributeName, Class<T> type)
extracts a simple attribute type- Type Parameters:
T
- a simple attribute type as Long, Double, String, Boolean or Instant. Other types are not allowed- Parameters:
attributeName
- the name of the array attributetype
- the type that should be extracted
-
getSimpleArrayAttributeSet
protected Set<String> getSimpleArrayAttributeSet(String attributeName)
extracts a simple attribute type- Parameters:
attributeName
- the name of the array attribute
-
getSimpleArrayAttributeSet
protected <T> Set<T> getSimpleArrayAttributeSet(String attributeName, Class<T> type)
extracts a simple attribute type- Type Parameters:
T
- a simple attribute type as Long, Double, String, Boolean or Instant. Other types are not allowed- Parameters:
attributeName
- the name of the array attributetype
- the type that should be extracted
-
setAttribute
protected void setAttribute(String attributeName, String attributeValue)
adds or removes a string type attribute
-
setAttribute
protected void setAttribute(String attributeName, Boolean attributeValue)
adds or removes a boolean type attribute
-
setAttribute
protected void setAttribute(String attributeName, Long attributeValue)
adds or removes a long type attribute
-
setAttribute
protected void setAttribute(String attributeName, Integer attributeValue)
adds or removes an integer type attribute
-
setAttribute
protected void setAttribute(String attributeName, Double attributeValue)
adds or removes a double type attribute
-
setDateTimeAttribute
protected void setDateTimeAttribute(String attributeName, Instant attributeValue)
adds or removes a dateTime type attribute by default the JSON String representation will keep DEFAULT_FRACTIONALS_TO_KEEP fractionals i.e. 1970-01-01T00:00:00.000Z
-
setDateTimeAttribute
protected void setDateTimeAttribute(String attributeName, Instant attributeValue, int fractionalDigits)
adds or removes a dateTime type attribute including the given fractionalDigits inside the JSON TextNode- Parameters:
attributeName
- the given attributeName for the related Instant attributeValueattributeValue
- the attributeValue might be null to remove the attribute from the JSON documentfractionalDigits
- MUST be a positive value between zero and nine i.e 0-9 default is set to 3- See Also:
TimeUtils.DEFAULT_INSTANT_FRACTIONAL_DIGITS_FORMAT
-
setDateTimeAttribute
protected void setDateTimeAttribute(String attributeName, LocalDateTime attributeValue)
adds or removes a dateTime type attribute
-
setDateTimeAttribute
protected void setDateTimeAttribute(String attributeName, OffsetDateTime attributeValue)
adds or removes a dateTime type attribute
-
setAttribute
protected void setAttribute(String attributeName, com.fasterxml.jackson.databind.node.ObjectNode attributeValue)
adds or removes an object type attribute
-
setAttribute
protected <T extends com.fasterxml.jackson.databind.JsonNode> void setAttribute(String attributeName, List<T> attributeValue)
adds or removes an array type attribute
-
setStringAttributeList
protected void setStringAttributeList(String attributeName, List<String> attributeValue)
adds or removes an array type attribute
-
setStringAttributeList
protected void setStringAttributeList(String attributeName, Set<String> attributeValue)
adds or removes an array type attribute
-
setAttributeList
protected <T> void setAttributeList(String attributeName, List<T> attributeValue)
adds or removes an array type attribute
-
addAttribute
protected <T extends com.fasterxml.jackson.databind.JsonNode> void addAttribute(String attributeName, T attributeValue)
adds a single entry to the array type attribute
-
toString
public String toString()
override method for usage with wildfly 18 that still uses jackson 2.9.x- Overrides:
toString
in classcom.fasterxml.jackson.databind.node.BaseJsonNode
-
toPrettyString
public String toPrettyString()
override method for usage with wildfly 18 that still uses jackson 2.9.x- Overrides:
toPrettyString
in classcom.fasterxml.jackson.databind.node.BaseJsonNode
-
isEmpty
public boolean isEmpty()
override method for usage with wildfly 18 that still uses jackson 2.9.x- Overrides:
isEmpty
in classcom.fasterxml.jackson.databind.node.ObjectNode
-
-