Class GenericScimResource

  • All Implemented Interfaces:
    ScimResource

    public final class GenericScimResource
    extends Object
    implements ScimResource

    A generic SCIM object. This object can be used if you have no Java object representing the SCIM object being returned.

    This object can be used when the exact structure of the SCIM object that will be received as JSON text is not known. This will provide methods that can read attributes from those objects without needing to know the schema ahead of time. Another way to work with SCIM objects is when you know ahead of time what the schema will be. In that case you could still use this object, but BaseScimResource might be a better choice.

    If you have a BaseScimResource derived object, you can always get a GenericScimResource by calling asGenericScimResource(). You could also go the other way by calling getObjectNode(), followed by JsonUtils.nodeToValue(JsonNode, Class).

    See Also:
    BaseScimResource
    • Constructor Detail

      • GenericScimResource

        public GenericScimResource​(com.fasterxml.jackson.databind.node.ObjectNode objectNode)
        Create a new GenericScimResource backed by an ObjectNode.
        Parameters:
        objectNode - The ObjectNode that backs this object.
    • Method Detail

      • getObjectNode

        public com.fasterxml.jackson.databind.node.ObjectNode getObjectNode()
        Gets the ObjectNode that backs this object.
        Returns:
        a ObjectNode.
      • getMeta

        public Meta getMeta()
        Gets metadata about the object.
        Specified by:
        getMeta in interface ScimResource
        Returns:
        Meta containing metadata about the object.
      • setMeta

        public void setMeta​(Meta meta)
        Sets metadata for the object.
        Specified by:
        setMeta in interface ScimResource
        Parameters:
        meta - Meta containing metadata for the object.
      • setId

        public void setId​(String id)
        Sets the id of the object.
        Specified by:
        setId in interface ScimResource
        Parameters:
        id - The object's id.
      • getSchemaUrns

        public List<StringgetSchemaUrns()
        Gets the schema urns for this object. This includes the one for the class that extends this class (taken from the annotation), as well as any that are present in the extensions.
        Specified by:
        getSchemaUrns in interface ScimResource
        Returns:
        the schema urns for this object.
      • setSchemaUrns

        public void setSchemaUrns​(Collection<String> schemaUrns)
        Sets the schema urns for this object. This set should contain all schema urns including the one for this object and all extensions. The value must not be null.
        Specified by:
        setSchemaUrns in interface ScimResource
        Parameters:
        schemaUrns - A Collection containing the schema urns for this object.
      • getValue

        public com.fasterxml.jackson.databind.JsonNode getValue​(String path)
                                                         throws ScimException
        Gets a single JsonNode from a generic SCIM resource. This value may be an ArrayNode.

        For example: With a generic SCIM resource representing the folowing JSON:

        
           {
             "name" : "Bob",
             "friends" : [ "Amy", "Beth", "Carol" ]
           }
         

        gsr.getValue("name"); would return a TextNode containing "Bob"

        gsr.getValue("friends"); would return an ArrayNode containing 3 TextNodes with the values "Amy", "Beth", and "Carol"

        Parameters:
        path - the String path of the object.
        Returns:
        the JsonNode at the path, or a NullNode if nothing is found
        Throws:
        ScimException - thrown if an error occurs.
      • getValue

        public com.fasterxml.jackson.databind.JsonNode getValue​(Path path)
                                                         throws ScimException
        Gets a single JsonNode from a generic SCIM resource. This value may be an ArrayNode.

        For example: With a generic SCIM resource representing the folowing JSON:

        
           {
             "name" : "Bob",
             "friends" : [ "Amy", "Beth", "Carol" ]
           }
         

        gsr.getValue("name"); would return a TextNode containing "Bob"

        gsr.getValue("friends"); would return an ArrayNode containing 3 TextNodes with the values "Amy", "Beth", and "Carol"

        Parameters:
        path - the path of the object.
        Returns:
        the JsonNode at the path, or a NullNode if nothing is found
        Throws:
        ScimException - thrown if an error occurs.
      • removeValues

        public boolean removeValues​(String path)
                             throws ScimException
        Removes values at the provided path. Equivalent to using the JsonUtils.removeValues(Path, ObjectNode) method: JsonUtils.removeValue(Path.fromString(path), getObjectNode(), values).
        Parameters:
        path - The path to the attribute whose values to remove.
        Returns:
        Whether one or more values where removed.
        Throws:
        ScimException - If the path is invalid.
      • removeValues

        public boolean removeValues​(Path path)
                             throws ScimException
        Removes values at the provided path. Equivalent to using the JsonUtils.removeValues(Path, ObjectNode) method: JsonUtils.removeValue(Path.fromString(path), getObjectNode(), values).
        Parameters:
        path - The path to the attribute whose values to remove.
        Returns:
        Whether one or more values where removed.
        Throws:
        ScimException - If the path is invalid.
      • asGenericScimResource

        public GenericScimResource asGenericScimResource()
        Returns the GenericScimResource representation of this ScimResource. If this ScimResource is already a GenericScimResource, this same instance will be returned.
        Specified by:
        asGenericScimResource in interface ScimResource
        Returns:
        The GenericScimResource representation of this ScimResource.
      • equals

        public boolean equals​(Object o)
        Indicates whether the provided object is equal to this generic SCIM resource.
        Overrides:
        equals in class Object
        Parameters:
        o - The object to compare.
        Returns:
        true if the provided object is equal to this generic SCIM resource, or false if not.
      • hashCode

        public int hashCode()
        Retrieves a hash code for this generic SCIM resource.
        Overrides:
        hashCode in class Object
        Returns:
        A hash code for this generic SCIM resource.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                String value)
                                         throws ScimException
        Adds or replaces a String value in a generic SCIM resource. For example: In a GenericScimResource (gsr) representing the following resource:
        
         {
           "path1":"stringValue"
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a String would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a String would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                String value)
                                         throws ScimException
        Adds or replaces a String value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"stringValue"
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a String would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a String would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addStringValues

        public GenericScimResource addStringValues​(String path,
                                                   List<String> values)
                                            throws ScimException
        Adds String values to an array node. If no array node exists at the specified path, a new array node will be created. For example: In a GenericScimResource (gsr) representing the following resource:
        
         {
           "path1":[ "stringValue1", "stringValue2" ]
         }
         

        gsr.addStringValues("path1", path1values) where path1Value is a List of String. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addStringValues("path2", path2values) where path2values is a List of String. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addStringValues

        public GenericScimResource addStringValues​(Path path,
                                                   List<String> values)
                                            throws ScimException
        Adds String values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ "stringValue1", "stringValue2" ]
         }
         

        gsr.addStringValues(Path.fromString("path1"), path1values) where path1Value is a List of String. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addStringValues(Path.fromString("path2"), path2values) where path2values is a List of String. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getStringValue

        public String getStringValue​(String path)
                              throws ScimException
        Gets a String value from a generic SCIM resource. If the path exists, the JSON node at the path must be a String. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"stringValue1"
           }
         

        getStringValue("path1") returns "stringValue1"

        getStringValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getStringValue

        public String getStringValue​(Path path)
                              throws ScimException
        Gets a String value from a generic SCIM resource. If the path exists, the JSON node at the path must be a String. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"stringValue1"
           }
         

        getStringValue(Path.fromString("path1")) returns Stringexample

        getStringValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getStringValueList

        public List<StringgetStringValueList​(String path)
                                        throws ScimException
        Gets a list of String from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of String. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1": ["stringValue1", "stringValue2"]
           }
         

        getStringValueList("path1") returns a list containing "stringValue1", "stringValue2"

        getStringValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getStringValueList

        public List<StringgetStringValueList​(Path path)
                                        throws ScimException
        Gets a list of String from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of String. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":["stringValue1", "stringValue2"]
           }
         

        getStringValueList(Path.fromString("path1")) returns a list containing "stringValue1", "stringValue2"

        getStringValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                Boolean value)
                                         throws ScimException
        Adds or replaces a Boolean value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":true
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a Boolean would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a Boolean would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                Boolean value)
                                         throws ScimException
        Adds or replaces a Boolean value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":true
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a Boolean would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a Boolean would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addBooleanValues

        @Deprecated
        public GenericScimResource addBooleanValues​(String path,
                                                    List<Boolean> values)
                                             throws ScimException
        Deprecated.
        Since 2.4.0. Boolean attributes represent data that has one of two possible values, so they are single-valued in nature. Thus, a multi-valued boolean array is not well-defined, since arrays such as [true, false] do not contain meaningful data. Use replaceValue(String, Boolean) instead.
        Adds Boolean values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ true, false ]
         }
         

        gsr.addBooleanValues("path1", path1values) where path1Value is a List of Boolean. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addBooleanValues("path2", path2values) where path2values is a List of Boolean. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addBooleanValues

        @Deprecated
        public GenericScimResource addBooleanValues​(Path path,
                                                    List<Boolean> values)
                                             throws ScimException
        Deprecated.
        Since 2.4.0. Boolean attributes represent data that has one of two possible values, so they are single-valued in nature. Thus, a multi-valued boolean array is not well-defined, since arrays such as [true, false] do not contain meaningful data. Use replaceValue(Path, Boolean) instead.
        Adds Boolean values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ true, false ]
         }
         

        gsr.addBooleanValues(Path.fromString("path1"), path1values) where path1Value is a List of Boolean. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addBooleanValues(Path.fromString("path2"), path2values) where path2values is a List of Boolean. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getBooleanValue

        public Boolean getBooleanValue​(String path)
                                throws ScimException
        Gets a Boolean value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Boolean. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":true
           }
         

        getBooleanValue("path1") returns true

        getBooleanValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getBooleanValue

        public Boolean getBooleanValue​(Path path)
                                throws ScimException
        Gets a Boolean value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Boolean. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":true
           }
         

        getBooleanValue(Path.fromString("path1")) returns true

        getBooleanValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getBooleanValueList

        @Deprecated
        public List<BooleangetBooleanValueList​(String path)
                                          throws ScimException
        Deprecated.
        Since 2.4.0. Boolean attributes represent data that has one of two possible values, so they are single-valued in nature. Thus, a multi-valued boolean array is not well-defined, since arrays such as [true, false] do not contain meaningful data. Use getBooleanValue(String) instead.
        Gets a list of Boolean from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Boolean. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[true, false]
           }
         

        getBooleanValueList("path1") returns a list containing true, false

        getBooleanValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getBooleanValueList

        @Deprecated
        public List<BooleangetBooleanValueList​(Path path)
                                          throws ScimException
        Deprecated.
        Since 2.4.0. Boolean attributes represent data that has one of two possible values, so they are single-valued in nature. Thus, a multi-valued boolean array is not well-defined, since arrays such as [true, false] do not contain meaningful data. Use getBooleanValue(Path) instead.
        Gets a list of Boolean from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Boolean. If the path does not exist, an empty list will be returned.

        For example:

        
           In a GenericScimResource (gsr) representing the following resource:
           {
             "path1":[true, false]
           }
         

        getBooleanValueList(Path.fromString("path1")) returns a list containing true, false

        getBooleanValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                Double value)
                                         throws ScimException
        Adds or replaces a Double value in a generic SCIM resource. For example: In a GenericScimResource (gsr) representing the following resource:
        
         {
           "path1":2.0
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a Double would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a Double would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                Double value)
                                         throws ScimException
        Adds or replaces a Double value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":2.0
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a Double would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a Double would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addDoubleValues

        public GenericScimResource addDoubleValues​(String path,
                                                   List<Double> values)
                                            throws ScimException
        Adds Double values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ 2.1, 2.2 ]
         }
         

        gsr.addDoubleValues("path1", path1values) where path1Value is a List of Double. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addDoubleValues("path2", path2values) where path2values is a List of Double. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addDoubleValues

        public GenericScimResource addDoubleValues​(Path path,
                                                   List<Double> values)
                                            throws ScimException
        Adds Double values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ 2.1, 2.2 ]
         }
         

        gsr.addDoubleValues(Path.fromString("path1"), path1values) where path1Value is a List of Double. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addDoubleValues(Path.fromString("path2"), path2values) where path2values is a List of Double. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getDoubleValue

        public Double getDoubleValue​(String path)
                              throws ScimException
        Gets a Double value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Double. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":2.0
           }
         

        getDoubleValue("path1") returns 2.0

        getDoubleValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getDoubleValue

        public Double getDoubleValue​(Path path)
                              throws ScimException
        Gets a Double value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Double. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":2.0
           }
         

        getDoubleValue(Path.fromString("path1")) returns 2.0

        getDoubleValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getDoubleValueList

        public List<DoublegetDoubleValueList​(String path)
                                        throws ScimException
        Gets a list of Double from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Double. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[2.1, 2.2]
           }
         

        getDoubleValueList("path1") returns a list containing 2.1, 2.2

        getDoubleValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getDoubleValueList

        public List<DoublegetDoubleValueList​(Path path)
                                        throws ScimException
        Gets a list of Double from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Double. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[2.1, 2.2]
           }
         

        getDoubleValueList(Path.fromString("path1")) returns a list containing 2.1, 2.2

        getDoubleValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                Integer value)
                                         throws ScimException
        Adds or replaces an Integer value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":7
         }
         

        gsr.replaceValue("path1", path1value) where path1value is an Integer would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is an Integer would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                Integer value)
                                         throws ScimException
        Adds or replaces an Integer value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":7
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is an Integer would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is an Integer would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addIntegerValues

        public GenericScimResource addIntegerValues​(String path,
                                                    List<Integer> values)
                                             throws ScimException
        Adds Integer values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ 11, 13 ]
         }
         

        gsr.addIntegerValues("path1", path1values) where path1Value is a List of Integer. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addIntegerValues("path2", path2values) where path2values is a List of Integer. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addIntegerValues

        public GenericScimResource addIntegerValues​(Path path,
                                                    List<Integer> values)
                                             throws ScimException
        Adds Integer values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ 11, 13 ]
         }
         

        gsr.addIntegerValues(Path.fromString("path1"), path1values) where path1Value is a List of Integer. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addIntegerValues(Path.fromString("path2"), path2values) where path2values is a List of Integer. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getIntegerValue

        public Integer getIntegerValue​(String path)
                                throws ScimException
        Gets an Integer value from a generic SCIM resource. If the path exists, the JSON node at the path must be an Integer. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":7
           }
         

        getIntegerValue("path1") returns 7

        getIntegerValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getIntegerValue

        public Integer getIntegerValue​(Path path)
                                throws ScimException
        Gets an Integer value from a generic SCIM resource. If the path exists, the JSON node at the path must be an Integer. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":7
           }
         

        getIntegerValue(Path.fromString("path1")) returns 7

        getIntegerValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getIntegerValueList

        public List<IntegergetIntegerValueList​(String path)
                                          throws ScimException
        Gets a list of Integer from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Integer. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[11, 13]
           }
         

        getIntegerValueList("path1") returns a list containing 11, 13

        getIntegerValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getIntegerValueList

        public List<IntegergetIntegerValueList​(Path path)
                                          throws ScimException
        Gets a list of Integer from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Integer. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[11, 13]
           }
         

        getIntegerValueList(Path.fromString("path1")) returns a list containing 11, 13

        getIntegerValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                Long value)
                                         throws ScimException
        Adds or replaces a Long value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":7
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a Long would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a Long would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                Long value)
                                         throws ScimException
        Adds or replaces a Long value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":7
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a Long would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a Long would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addLongValues

        public GenericScimResource addLongValues​(String path,
                                                 List<Long> values)
                                          throws ScimException
        Adds Long values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ 11, 13 ]
         }
         

        gsr.addLongValues("path1", path1values) where path1Value is a List of Long. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addLongValues("path2", path2values) where path2values is a List of Long. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addLongValues

        public GenericScimResource addLongValues​(Path path,
                                                 List<Long> values)
                                          throws ScimException
        Adds Long values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ 11, 13 ]
         }
         

        gsr.addLongValues(Path.fromString("path1"), path1values) where path1Value is a List of Long. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addLongValues(Path.fromString("path2"), path2values) where path2values is a List of Long. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getLongValue

        public Long getLongValue​(String path)
                          throws ScimException
        Gets a Long value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Long. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":7
           }
         

        getLongValue("path1") returns 7

        getLongValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getLongValue

        public Long getLongValue​(Path path)
                          throws ScimException
        Gets a Long value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Long. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":7
           }
         

        getLongValue(Path.fromString("path1")) returns 7

        getLongValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getLongValueList

        public List<LonggetLongValueList​(String path)
                                    throws ScimException
        Gets a list of Long from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Long. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[11, 13]
           }
         

        getLongValueList("path1") returns a list containing 11, 13

        getLongValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getLongValueList

        public List<LonggetLongValueList​(Path path)
                                    throws ScimException
        Gets a list of Long from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Long. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":[11, 13]
           }
         

        getLongValueList(Path.fromString("path1")) returns a list containing 11, 13

        getLongValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                Date value)
                                         throws ScimException
        Adds or replaces a Date value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"1970-04-20T17:54:47.542Z"
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a Date would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a Date would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                Date value)
                                         throws ScimException
        Adds or replaces a Date value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"1970-04-20T17:54:47.542Z"
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a Date would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a Date would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addDateValues

        public GenericScimResource addDateValues​(String path,
                                                 List<Date> values)
                                          throws ScimException
        Adds Date values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ "1970-04-20T17:54:47.542Z", "2000-04-20T17:54:47.542Z" ]
         }
         

        gsr.addDateValues("path1", path1values) where path1Value is a List of Date. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addDateValues("path2", path2values) where path2values is a List of Date. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addDateValues

        public GenericScimResource addDateValues​(Path path,
                                                 List<Date> values)
                                          throws ScimException
        Adds Date values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ "1970-04-20T17:54:47.542Z", "2000-04-20T17:54:47.542Z" ]
         }
         

        gsr.addDateValues(Path.fromString("path1"), path1values) where path1Value is a List of Date. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addDateValues(Path.fromString("path2"), path2values) where path2values is a List of Date. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getDateValue

        public Date getDateValue​(String path)
                          throws ScimException
        Gets a Date value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Date. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"1970-04-20T17:54:47.542Z"
           }
         

        getDateValue("path1") returns a Date representing "1970-04-20T17:54:47.542Z"

        getDateValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getDateValue

        public Date getDateValue​(Path path)
                          throws ScimException
        Gets a Date value from a generic SCIM resource. If the path exists, the JSON node at the path must be a Date. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"1970-04-20T17:54:47.542Z"
           }
         

        getDateValue(Path.fromString("path1")) returns a Date representing "1970-04-20T17:54:47.542Z"

        getDateValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getDateValueList

        public List<DategetDateValueList​(String path)
                                    throws ScimException
        Gets a list of Date from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Date. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":["1970-04-20T17:54:47.542Z", "2000-04-20T17:54:47.542Z"]
           }
         

        getDateValueList("path1") returns a list containing dates representing "1970-04-20T17:54:47.542Z", "2000-04-20T17:54:47.542Z"

        getDateValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getDateValueList

        public List<DategetDateValueList​(Path path)
                                    throws ScimException
        Gets a list of Date from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of Date. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":["1970-04-20T17:54:47.542Z", "2000-04-20T17:54:47.542Z"]
           }
         

        getDateValueList(Path.fromString("path1")) returns a list containing dates representing "1970-04-20T17:54:47.542Z", "2000-04-20T17:54:47.542Z"

        getDateValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getDateJsonNode

        public static com.fasterxml.jackson.databind.node.TextNode getDateJsonNode​(Date date)
                                                                            throws ScimException
        Gets a JsonNode that represents the supplied date.
        Parameters:
        date - the date to represent as a JsonNode.
        Returns:
        the JsonNode representing the date.
        Throws:
        ScimException - thrown if an error occurs.
      • getDateFromJsonNode

        public static Date getDateFromJsonNode​(com.fasterxml.jackson.databind.JsonNode node)
                                        throws ScimException
        Gets the date represented by the supplied JsonNode.
        Parameters:
        node - the JsonNode representing the date.
        Returns:
        the date represented by the JsonNode.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                byte[] value)
                                         throws ScimException
        Adds or replaces a binary value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"AjIzLg=="
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a byte[] would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a byte[] would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                byte[] value)
                                         throws ScimException
        Adds or replaces a binary value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"AjIzLg=="
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a byte[] would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a byte[] would add a field called "path2" with the value of the path2value variabl

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addBinaryValues

        public GenericScimResource addBinaryValues​(String path,
                                                   List<byte[]> values)
                                            throws ScimException
        Adds binary values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ "AjIzLg==", "AjNjLp==" ]
         }
         

        gsr.addBinaryValues("path1", path1values) where path1Value is a List of byte[]. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addBinaryValues("path2", path2values) where path2values is a List of byte[]. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addBinaryValues

        public GenericScimResource addBinaryValues​(Path path,
                                                   List<byte[]> values)
                                            throws ScimException
        Adds binary values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":[ "AjIzLg==", "AjNjLp==" ]
         }
         

        gsr.addBinaryValues(Path.fromString("path1"), path1values) where path1Value is a List of byte[]. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addBinaryValues(Path.fromString("path2"), path2values) where path2values is a List of byte[]. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getBinaryValue

        public byte[] getBinaryValue​(String path)
                              throws ScimException
        Gets a binary value from a generic SCIM resource. If the path exists, the JSON node at the path must be a binary value. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"AjIzLg=="
           }
         

        getBinaryValue("path1") returns the byte array decoded from "AjIzLg=="

        getBinaryValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getBinaryValue

        public byte[] getBinaryValue​(Path path)
                              throws ScimException
        Gets a binary value from a generic SCIM resource. If the path exists, the JSON node at the path must be a binary value. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"AjIzLg=="
           }
         

        getBinaryValue(Path.fromString("path1")) returns the byte array decoded from "AjIzLg=="

        getBinaryValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getBinaryValueList

        public List<byte[]> getBinaryValueList​(String path)
                                        throws ScimException
        Gets a list of byte[] from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of binary values. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":["AjIzLg==", "AjNjLp=="]
           }
         

        getBinaryValueList("path1") returns a list containing the byte arrays decoded from "AjIzLg==", "AjNjLp=="

        getBinaryValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getBinaryValueList

        public List<byte[]> getBinaryValueList​(Path path)
                                        throws ScimException
        Gets a list of byte[] from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of binary values. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":["AjIzLg==", "AjNjLp=="]
           }
         

        getBinaryValueList(Path.fromString("path1")) returns a list containing the byte arrays decoded from "AjIzLg==", "AjNjLp=="

        getBinaryValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • replaceValue

        public GenericScimResource replaceValue​(String path,
                                                URI value)
                                         throws ScimException
        Adds or replaces a URI value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"http://localhost:8080/uri/One"
         }
         

        gsr.replaceValue("path1", path1value) where path1value is a URI would change the "path1" field to the value of the path1value variable

        gsr.replaceValue("path2", path2value) where path2value is a URI would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • replaceValue

        public GenericScimResource replaceValue​(Path path,
                                                URI value)
                                         throws ScimException
        Adds or replaces a URI value in a generic SCIM resource.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":"http://localhost:8080/uri/One"
         }
         

        gsr.replaceValue(Path.fromString("path1"), path1value) where path1value is a URI would change the "path1" field to the value of the path1value variable

        gsr.replaceValue(Path.fromString("path2"), path2value) where path2value is a URI would add a field called "path2" with the value of the path2value variable

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to replace the value for.
        value - the new value.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addURIValues

        public GenericScimResource addURIValues​(String path,
                                                List<URI> values)
                                         throws ScimException
        Adds URI values to an array node. If no array node exists at the specified path, a new array node will be created. For example:

        In a GenericScimResource (gsr) representing the following resource:

        
         {
           "path1":
           [
               "http://localhost:8080/uri/One", "http://localhost:8080/uri/Two"
           ]
         }
         

        gsr.addURIValues("path1", path1values) where path1Value is a List of URI. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addURIValues("path2", path2values) where path2values is a List of URI. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • addURIValues

        public GenericScimResource addURIValues​(Path path,
                                                List<URI> values)
                                         throws ScimException
        Adds URI values to an array node. If no array node exists at the specified path, a new array node will be created.

        For example: In a GenericScimResource (gsr) representing the following resource: {

        
           "path1":
           [
               "http://localhost:8080/uri/One", "http://localhost:8080/uri/Two"
           ]
         }
         

        gsr.addURIValues(Path.fromString("path1"), path1values) where path1Value is a List of URI. Would add each of the items in the path1values list to the "path1" list in the generic SCIM resource

        gsr.addURIValues(Path.fromString("path2"), path2values) where path2values is a List of URI. Would create a new array called "path2"

        Note that in a case where multiple paths match (for example a path with a filter), all paths that match will be affected.

        Parameters:
        path - the path to add the list to.
        values - a list containing the new values.
        Returns:
        returns the new generic SCIM resource (this).
        Throws:
        ScimException - thrown if an error occurs (for example if the path or value is "null" or invalid).
      • getURIValue

        public URI getURIValue​(String path)
                        throws ScimException
        Gets a URI value from a generic SCIM resource. If the path exists, the JSON node at the path must be a URI. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"http://localhost:8080/uri/One"
           }
         

        getURIValue("path1") returns "http://localhost:8080/uri/One"

        getURIValue("bogusPath") returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getURIValue

        public URI getURIValue​(Path path)
                        throws ScimException
        Gets a URI value from a generic SCIM resource. If the path exists, the JSON node at the path must be a URI. If the path does not exist, "null" will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":"http://localhost:8080/uri/One"
           }
         

        getURIValue(Path.fromString("path1")) returns "http://localhost:8080/uri/One"

        getURIValue(Path.fromString("bogusPath")) returns null

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or null.
        Throws:
        ScimException - thrown if an error occurs.
      • getURIValueList

        public List<URIgetURIValueList​(String path)
                                  throws ScimException
        Gets a list of URI from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of URI. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":
             [
               "http://localhost:8080/uri/One", "http://localhost:8080/uri/Two"
             ]
           }
         

        getURIValueList("path1") returns a list containing "http://localhost:8080/uri/One", "http://localhost:8080/uri/Two"

        getURIValueList("bogusPath") returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.
      • getURIValueList

        public List<URIgetURIValueList​(Path path)
                                  throws ScimException
        Gets a list of URI from a generic SCIM resource. If the path exists, the JSON node at the path must be a list of URI. If the path does not exist, an empty list will be returned.

        For example: In a GenericScimResource (gsr) representing the following resource:

        
           {
             "path1":
             [
                 "http://localhost:8080/uri/One", "http://localhost:8080/uri/Two"
             ]
           }
         

        getURIValueList(Path.fromString("path1")) returns a list containing "http://localhost:8080/uri/One", "http://localhost:8080/uri/Two"

        getURIValueList(Path.fromString("bogusPath")) returns an empty list

        Parameters:
        path - the path to get the value from.
        Returns:
        the value at the path, or an empty list.
        Throws:
        ScimException - thrown if an error occurs.