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, BulkResponseGetOperation, 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:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonNode

    com.fasterxml.jackson.databind.JsonNode.OverwriteMode

    Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable

    com.fasterxml.jackson.databind.JsonSerializable.Base
  • Field Summary

    Fields inherited from class com.fasterxml.jackson.databind.node.ObjectNode

    _children

    Fields inherited from class com.fasterxml.jackson.databind.node.ContainerNode

    _nodeFactory
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <T extends com.fasterxml.jackson.databind.JsonNode>
    void
    addAttribute(String attributeName, T attributeValue)
    adds a single entry to the array type attribute
    boolean
    the equals method was overridden because long and integer-nodes might otherwise get comparison failures even if the value is identical
    protected <T extends com.fasterxml.jackson.databind.node.ObjectNode>
    List<T>
    getArrayAttribute(String attributeName, Class<T> type)
    extracts an object type attribute
    protected Optional<byte[]>
    getBinaryAttribute(String attributeName)
    extracts a string type attribute
    protected Optional<Boolean>
    getBooleanAttribute(String attributeName)
    extracts a boolean type attribute
    protected Optional<Instant>
    extracts a dateTime type attribute
    protected Optional<Double>
    getDoubleAttribute(String attributeName)
    extracts a double type attribute
    protected Optional<Integer>
    getIntegerAttribute(String attributeName)
    extracts an integer type attribute
    protected Optional<Long>
    getLongAttribute(String attributeName)
    extracts a long type attribute
    protected <T extends com.fasterxml.jackson.databind.node.ObjectNode>
    Optional<T>
    getObjectAttribute(String attributeName, Class<T> type)
    extracts an object type attribute
    the schema definition of this document node
    protected List<String>
    extracts a simple attribute type
    protected <T> List<T>
    getSimpleArrayAttribute(String attributeName, Class<T> type)
    extracts a simple attribute type
    protected Set<String>
    extracts a simple attribute type
    protected <T> Set<T>
    getSimpleArrayAttributeSet(String attributeName, Class<T> type)
    extracts a simple attribute type
    protected Optional<String>
    getStringAttribute(String attributeName)
    extracts a string type attribute
    protected <T extends com.fasterxml.jackson.databind.node.TextNode>
    Optional<T>
    getStringAttribute(String attributeName, Class<T> type)
    extracts a TextNode type attribute
    boolean
    override method for usage with wildfly 18 that still uses jackson 2.9.x
    protected void
    setAttribute(String attributeName, byte[] attributeValue)
    adds or removes a binary type attribute
    protected void
    setAttribute(String attributeName, com.fasterxml.jackson.databind.node.ObjectNode attributeValue)
    adds or removes an object type attribute
    protected void
    setAttribute(String attributeName, Boolean attributeValue)
    adds or removes a boolean type attribute
    protected void
    setAttribute(String attributeName, Double attributeValue)
    adds or removes a double type attribute
    protected void
    setAttribute(String attributeName, Integer attributeValue)
    adds or removes an integer type attribute
    protected void
    setAttribute(String attributeName, Long attributeValue)
    adds or removes a long type attribute
    protected void
    setAttribute(String attributeName, String attributeValue)
    adds or removes a string type attribute
    protected <T extends com.fasterxml.jackson.databind.JsonNode>
    void
    setAttribute(String attributeName, List<T> attributeValue)
    adds or removes an array type attribute
    protected <T> void
    setAttributeList(String attributeName, List<T> attributeValue)
    adds or removes an array type attribute
    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
    protected void
    setDateTimeAttribute(String attributeName, Instant attributeValue, int fractionalDigits)
    adds or removes a dateTime type attribute including the given fractionalDigits inside the JSON TextNode
    protected void
    setDateTimeAttribute(String attributeName, LocalDateTime attributeValue)
    adds or removes a dateTime type attribute
    protected void
    setDateTimeAttribute(String attributeName, OffsetDateTime attributeValue)
    adds or removes a dateTime type attribute
    protected void
    setStringAttributeList(String attributeName, List<String> attributeValue)
    adds or removes an array type attribute
    protected void
    setStringAttributeList(String attributeName, Set<String> attributeValue)
    adds or removes an array type attribute
    override method for usage with wildfly 18 that still uses jackson 2.9.x
    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, _contentsToSerialize, _put, _withArray, _withArrayAddTailProperty, _withObject, _withObjectAddTailProperty, asToken, deepCopy, elements, equals, fieldNames, fields, findParent, findParents, findValue, findValues, findValuesAsText, forEachEntry, get, get, getNodeType, hashCode, isEmpty, isObject, optional, path, path, properties, propertyStream, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, putArray, putIfAbsent, putNull, putObject, putPOJO, putRawValue, remove, remove, removeAll, removeIf, replace, required, retain, retain, serialize, serializeFilteredContents, serializeWithType, set, setAll, setAll, size, values, valueStream, with, withArray, withArrayProperty, withObject, withObjectProperty, 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, removeNulls, textNode

    Methods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode

    _bigIntFromBigDec, _jsonPointerIfValid, _reportWrongNodeOperation, _reportWrongNodeType, _withXxxMayReplace, _withXxxVerifyReplace, findPath, numberType, required, traverse, traverse, withArray, withObject

    Methods inherited from class com.fasterxml.jackson.databind.JsonNode

    _reportRequiredViolation, _this, asBoolean, asBoolean, asDouble, asDouble, asInt, asInt, asLong, asLong, asOptional, asText, at, at, bigIntegerValue, binaryValue, booleanValue, canConvertToExactIntegral, 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, optional, require, requiredAt, requiredAt, requireNonNull, shortValue, textValue, withArray, withArray, withObject, withObject

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • ScimObjectNode

      public ScimObjectNode()
    • ScimObjectNode

      public ScimObjectNode(SchemaAttribute schemaAttribute)
  • Method Details

    • getStringAttribute

      protected Optional<String> getStringAttribute(String attributeName)
      extracts a string type attribute
    • getBinaryAttribute

      protected Optional<byte[]> getBinaryAttribute(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 a TextNode 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 attribute
      type - 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 attribute
      type - 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, byte[] attributeValue)
      adds or removes a binary 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
      See Also:
    • 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 attributeValue
      attributeValue - the attributeValue might be null to remove the attribute from the JSON document
      fractionalDigits - MUST be a positive value between zero and nine i.e 0-9 default is set to 3
      See Also:
    • 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 class com.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 class com.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 class com.fasterxml.jackson.databind.node.ObjectNode
    • equals

      public boolean equals(Object o)
      the equals method was overridden because long and integer-nodes might otherwise get comparison failures even if the value is identical
      Overrides:
      equals in class com.fasterxml.jackson.databind.node.ObjectNode
    • getSchemaAttribute

      public SchemaAttribute getSchemaAttribute()
      the schema definition of this document node
      Specified by:
      getSchemaAttribute in interface ScimNode