Class GenericScimResource
- java.lang.Object
-
- com.unboundid.scim2.common.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 callingasGenericScimResource()
. You could also go the other way by callinggetObjectNode()
, followed byJsonUtils.nodeToValue(JsonNode, Class)
.- See Also:
BaseScimResource
-
-
Constructor Summary
Constructors Constructor Description GenericScimResource()
Create a new empty GenericScimResource.GenericScimResource(com.fasterxml.jackson.databind.node.ObjectNode objectNode)
Create a new GenericScimResource backed by an ObjectNode.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GenericScimResource
addBinaryValues(Path path, byte[] value1, byte[]... values)
Alternate version ofaddBinaryValues(Path, List)
.GenericScimResource
addBinaryValues(Path path, List<byte[]> values)
Adds binary values to an array node.GenericScimResource
addBinaryValues(String path, byte[] value1, byte[]... values)
Alternate version ofaddBinaryValues(String, List)
.GenericScimResource
addBinaryValues(String path, List<byte[]> values)
Adds binary values to an array node.GenericScimResource
addBooleanValues(Path path, List<Boolean> values)
Deprecated.Since 2.4.0.GenericScimResource
addBooleanValues(String path, List<Boolean> values)
Deprecated.Since 2.4.0.GenericScimResource
addDateValues(Path path, Date value1, Date... values)
Alternate version ofaddDateValues(Path, List)
.GenericScimResource
addDateValues(Path path, List<Date> values)
Adds Date values to an array node.GenericScimResource
addDateValues(String path, Date value1, Date... values)
Alternate version ofaddDateValues(String, List)
.GenericScimResource
addDateValues(String path, List<Date> values)
Adds Date values to an array node.GenericScimResource
addDoubleValues(Path path, Double value1, Double... values)
Alternate version ofaddDoubleValues(Path, List)
.GenericScimResource
addDoubleValues(Path path, List<Double> values)
Adds Double values to an array node.GenericScimResource
addDoubleValues(String path, Double value1, Double... values)
Alternate version ofaddDoubleValues(String, List)
.GenericScimResource
addDoubleValues(String path, List<Double> values)
Adds Double values to an array node.GenericScimResource
addIntegerValues(Path path, Integer value1, Integer... values)
Alternate version ofaddIntegerValues(Path, List)
.GenericScimResource
addIntegerValues(Path path, List<Integer> values)
Adds Integer values to an array node.GenericScimResource
addIntegerValues(String path, Integer value1, Integer... values)
Alternate version ofaddIntegerValues(String, List)
.GenericScimResource
addIntegerValues(String path, List<Integer> values)
Adds Integer values to an array node.GenericScimResource
addLongValues(Path path, Long value1, Long... values)
Alternate version ofaddLongValues(Path, List)
.GenericScimResource
addLongValues(Path path, List<Long> values)
Adds Long values to an array node.GenericScimResource
addLongValues(String path, Long value1, Long... values)
Alternate version ofaddLongValues(String, List)
.GenericScimResource
addLongValues(String path, List<Long> values)
Adds Long values to an array node.GenericScimResource
addStringValues(Path path, String value1, String... values)
Alternate version ofaddStringValues(Path, List)
.GenericScimResource
addStringValues(Path path, List<String> values)
Adds String values to an array node.GenericScimResource
addStringValues(String path, String value1, String... values)
Alternate version ofaddStringValues(String, List)
.GenericScimResource
addStringValues(String path, List<String> values)
Adds String values to an array node.GenericScimResource
addURIValues(Path path, URI value1, URI... values)
Alternate version ofaddURIValues(Path, List)
.GenericScimResource
addURIValues(Path path, List<URI> values)
Adds URI values to an array node.GenericScimResource
addURIValues(String path, URI value1, URI... values)
Alternate version ofaddURIValues(String, List)
.GenericScimResource
addURIValues(String path, List<URI> values)
Adds URI values to an array node.GenericScimResource
addValues(Path path, com.fasterxml.jackson.databind.node.ArrayNode values)
Add new values at the provided path.GenericScimResource
addValues(String path, com.fasterxml.jackson.databind.node.ArrayNode values)
Add new values at the provided path.GenericScimResource
asGenericScimResource()
Returns the GenericScimResource representation of this ScimResource.boolean
equals(Object o)
Indicates whether the provided object is equal to this generic SCIM resource.byte[]
getBinaryValue(Path path)
Gets a binary value from a generic SCIM resource.byte[]
getBinaryValue(String path)
Gets a binary value from a generic SCIM resource.List<byte[]>
getBinaryValueList(Path path)
Gets a list of byte[] from a generic SCIM resource.List<byte[]>
getBinaryValueList(String path)
Gets a list of byte[] from a generic SCIM resource.Boolean
getBooleanValue(Path path)
Gets a Boolean value from a generic SCIM resource.Boolean
getBooleanValue(String path)
Gets a Boolean value from a generic SCIM resource.List<Boolean>
getBooleanValueList(Path path)
Deprecated.Since 2.4.0.List<Boolean>
getBooleanValueList(String path)
Deprecated.Since 2.4.0.static Date
getDateFromJsonNode(com.fasterxml.jackson.databind.JsonNode node)
Gets the date represented by the supplied JsonNode.static com.fasterxml.jackson.databind.node.TextNode
getDateJsonNode(Date date)
Gets a JsonNode that represents the supplied date.Date
getDateValue(Path path)
Gets a Date value from a generic SCIM resource.Date
getDateValue(String path)
Gets a Date value from a generic SCIM resource.List<Date>
getDateValueList(Path path)
Gets a list of Date from a generic SCIM resource.List<Date>
getDateValueList(String path)
Gets a list of Date from a generic SCIM resource.Double
getDoubleValue(Path path)
Gets a Double value from a generic SCIM resource.Double
getDoubleValue(String path)
Gets a Double value from a generic SCIM resource.List<Double>
getDoubleValueList(Path path)
Gets a list of Double from a generic SCIM resource.List<Double>
getDoubleValueList(String path)
Gets a list of Double from a generic SCIM resource.String
getExternalId()
Gets the objects external id.String
getId()
Gets the id of the object.Integer
getIntegerValue(Path path)
Gets an Integer value from a generic SCIM resource.Integer
getIntegerValue(String path)
Gets an Integer value from a generic SCIM resource.List<Integer>
getIntegerValueList(Path path)
Gets a list of Integer from a generic SCIM resource.List<Integer>
getIntegerValueList(String path)
Gets a list of Integer from a generic SCIM resource.Long
getLongValue(Path path)
Gets a Long value from a generic SCIM resource.Long
getLongValue(String path)
Gets a Long value from a generic SCIM resource.List<Long>
getLongValueList(Path path)
Gets a list of Long from a generic SCIM resource.List<Long>
getLongValueList(String path)
Gets a list of Long from a generic SCIM resource.Meta
getMeta()
Gets metadata about the object.com.fasterxml.jackson.databind.node.ObjectNode
getObjectNode()
Gets theObjectNode
that backs this object.List<String>
getSchemaUrns()
Gets the schema urns for this object.String
getStringValue(Path path)
Gets a String value from a generic SCIM resource.String
getStringValue(String path)
Gets a String value from a generic SCIM resource.List<String>
getStringValueList(Path path)
Gets a list of String from a generic SCIM resource.List<String>
getStringValueList(String path)
Gets a list of String from a generic SCIM resource.URI
getURIValue(Path path)
Gets a URI value from a generic SCIM resource.URI
getURIValue(String path)
Gets a URI value from a generic SCIM resource.List<URI>
getURIValueList(Path path)
Gets a list of URI from a generic SCIM resource.List<URI>
getURIValueList(String path)
Gets a list of URI from a generic SCIM resource.com.fasterxml.jackson.databind.JsonNode
getValue(Path path)
Gets a single JsonNode from a generic SCIM resource.com.fasterxml.jackson.databind.JsonNode
getValue(String path)
Gets a single JsonNode from a generic SCIM resource.int
hashCode()
Retrieves a hash code for this generic SCIM resource.boolean
removeValues(Path path)
Removes values at the provided path.boolean
removeValues(String path)
Removes values at the provided path.GenericScimResource
replaceValue(Path path, byte[] value)
Adds or replaces a binary value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, com.fasterxml.jackson.databind.JsonNode value)
Update the value at the provided path.GenericScimResource
replaceValue(Path path, Boolean value)
Adds or replaces a Boolean value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, Double value)
Adds or replaces a Double value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, Integer value)
Adds or replaces an Integer value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, Long value)
Adds or replaces a Long value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, String value)
Adds or replaces a String value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, URI value)
Adds or replaces a URI value in a generic SCIM resource.GenericScimResource
replaceValue(Path path, Date value)
Adds or replaces a Date value in a generic SCIM resource.GenericScimResource
replaceValue(String path, byte[] value)
Adds or replaces a binary value in a generic SCIM resource.GenericScimResource
replaceValue(String path, com.fasterxml.jackson.databind.JsonNode value)
Update the value at the provided path.GenericScimResource
replaceValue(String path, Boolean value)
Adds or replaces a Boolean value in a generic SCIM resource.GenericScimResource
replaceValue(String path, Double value)
Adds or replaces a Double value in a generic SCIM resource.GenericScimResource
replaceValue(String path, Integer value)
Adds or replaces an Integer value in a generic SCIM resource.GenericScimResource
replaceValue(String path, Long value)
Adds or replaces a Long value in a generic SCIM resource.GenericScimResource
replaceValue(String path, String value)
Adds or replaces a String value in a generic SCIM resource.GenericScimResource
replaceValue(String path, URI value)
Adds or replaces a URI value in a generic SCIM resource.GenericScimResource
replaceValue(String path, Date value)
Adds or replaces a Date value in a generic SCIM resource.void
setExternalId(String externalId)
Sets the object's external id.void
setId(String id)
Sets the id of the object.void
setMeta(Meta meta)
Sets metadata for the object.void
setSchemaUrns(String schemaUrn, String... schemaUrns)
An alternate version ofScimResource.setSchemaUrns(Collection)
.void
setSchemaUrns(Collection<String> schemaUrns)
Sets the schema urns for this object.String
toString()
-
-
-
Constructor Detail
-
GenericScimResource
public GenericScimResource()
Create a new empty GenericScimResource.
-
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 theObjectNode
that backs this object.- Returns:
- a
ObjectNode
.
-
getMeta
public Meta getMeta()
Gets metadata about the object.- Specified by:
getMeta
in interfaceScimResource
- Returns:
Meta
containing metadata about the object.
-
setMeta
public void setMeta(Meta meta)
Sets metadata for the object.- Specified by:
setMeta
in interfaceScimResource
- Parameters:
meta
-Meta
containing metadata for the object.
-
getId
public String getId()
Gets the id of the object.- Specified by:
getId
in interfaceScimResource
- Returns:
- the id of the object.
-
setId
public void setId(String id)
Sets the id of the object.- Specified by:
setId
in interfaceScimResource
- Parameters:
id
- The object's id.
-
getSchemaUrns
public List<String> getSchemaUrns()
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 interfaceScimResource
- 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 benull
.- Specified by:
setSchemaUrns
in interfaceScimResource
- Parameters:
schemaUrns
- A Collection containing the schema urns for this object.
-
setSchemaUrns
public void setSchemaUrns(String schemaUrn, String... schemaUrns)
An alternate version ofScimResource.setSchemaUrns(Collection)
.- Specified by:
setSchemaUrns
in interfaceScimResource
- Parameters:
schemaUrn
- A schema URN that will be listed first. This must not benull
.schemaUrns
- An optional parameter for additional schema URNs. Anynull
values will be ignored.
-
getExternalId
public String getExternalId()
Gets the objects external id.- Specified by:
getExternalId
in interfaceScimResource
- Returns:
- The external id of the object.
-
setExternalId
public void setExternalId(String externalId)
Sets the object's external id.- Specified by:
setExternalId
in interfaceScimResource
- Parameters:
externalId
- The external id of the 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.
-
replaceValue
public GenericScimResource replaceValue(String path, com.fasterxml.jackson.databind.JsonNode value) throws ScimException
Update the value at the provided path. Equivalent to using theJsonUtils.replaceValue(Path, ObjectNode, JsonNode)
method: JsonUtils.replaceValues(Path.fromString(path), getObjectNode(), value).The
JsonUtils.valueToNode(Object)
method may be used to convert the given value instance to a JSON node.- Parameters:
path
- The path to the attribute whose value to set.value
- The value(s) to set.- Returns:
- This object.
- Throws:
ScimException
- thrown if an error occurs (for example if the path or value is "null
" or invalid).
-
replaceValue
public GenericScimResource replaceValue(Path path, com.fasterxml.jackson.databind.JsonNode value) throws ScimException
Update the value at the provided path. Equivalent to using theJsonUtils.replaceValue(Path, ObjectNode, JsonNode)
method: JsonUtils.replaceValues(path, getObjectNode(), value).The
JsonUtils.valueToNode(Object)
method may be used to convert the given value instance to a JSON node.- Parameters:
path
- The path to the attribute whose value to set.value
- The value(s) to set.- Returns:
- This object.
- Throws:
ScimException
- thrown if an error occurs (for example if the path or value is "null
" or invalid).
-
addValues
public GenericScimResource addValues(String path, com.fasterxml.jackson.databind.node.ArrayNode values) throws ScimException
Add new values at the provided path. Equivalent to using theJsonUtils.addValue(Path, ObjectNode, JsonNode)
method: JsonUtils.addValue(Path.fromString(path), getObjectNode(), values).The
JsonUtils.valueToNode(Object)
method may be used to convert the given value instance to a JSON node.- Parameters:
path
- The path to the attribute whose values to add.values
- The value(s) to add.- Returns:
- This object.
- Throws:
ScimException
- If the path is invalid.
-
addValues
public GenericScimResource addValues(Path path, com.fasterxml.jackson.databind.node.ArrayNode values) throws ScimException
Add new values at the provided path. Equivalent to using theJsonUtils.addValue(Path, ObjectNode, JsonNode)
method: JsonUtils.addValue(path, getObjectNode(), values).The
JsonUtils.valueToNode(Object)
method may be used to convert the given value instance to a JSON node.- Parameters:
path
- The path to the attribute whose values to add.values
- The value(s) to add.- Returns:
- This object.
- Throws:
ScimException
- If the path is invalid.
-
removeValues
public boolean removeValues(String path) throws ScimException
Removes values at the provided path. Equivalent to using theJsonUtils.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 theJsonUtils.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 interfaceScimResource
- 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.
-
hashCode
public int hashCode()
Retrieves 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(String path, String value1, String... values) throws ScimException
Alternate version ofaddStringValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addStringValues
public GenericScimResource addStringValues(Path path, String value1, String... values) throws ScimException
Alternate version ofaddStringValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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<String> getStringValueList(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<String> getStringValueList(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. UsereplaceValue(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. UsereplaceValue(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<Boolean> getBooleanValueList(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. UsegetBooleanValue(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<Boolean> getBooleanValueList(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. UsegetBooleanValue(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(String path, Double value1, Double... values) throws ScimException
Alternate version ofaddDoubleValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addDoubleValues
public GenericScimResource addDoubleValues(Path path, Double value1, Double... values) throws ScimException
Alternate version ofaddDoubleValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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<Double> getDoubleValueList(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<Double> getDoubleValueList(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(String path, Integer value1, Integer... values) throws ScimException
Alternate version ofaddIntegerValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addIntegerValues
public GenericScimResource addIntegerValues(Path path, Integer value1, Integer... values) throws ScimException
Alternate version ofaddIntegerValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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<Integer> getIntegerValueList(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<Integer> getIntegerValueList(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(String path, Long value1, Long... values) throws ScimException
Alternate version ofaddLongValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addLongValues
public GenericScimResource addLongValues(Path path, Long value1, Long... values) throws ScimException
Alternate version ofaddLongValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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<Long> getLongValueList(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<Long> getLongValueList(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(String path, Date value1, Date... values) throws ScimException
Alternate version ofaddDateValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addDateValues
public GenericScimResource addDateValues(Path path, Date value1, Date... values) throws ScimException
Alternate version ofaddDateValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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<Date> getDateValueList(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<Date> getDateValueList(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(String path, byte[] value1, byte[]... values) throws ScimException
Alternate version ofaddBinaryValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addBinaryValues
public GenericScimResource addBinaryValues(Path path, byte[] value1, byte[]... values) throws ScimException
Alternate version ofaddBinaryValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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(String path, URI value1, URI... values) throws ScimException
Alternate version ofaddURIValues(String, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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).
-
addURIValues
public GenericScimResource addURIValues(Path path, URI value1, URI... values) throws ScimException
Alternate version ofaddURIValues(Path, List)
.- Parameters:
path
- The path to the attribute that should be updated.value1
- The first value. This must not benull
.values
- An optional field for additional values. Anynull
values will be ignored.- Returns:
- This object.
- Throws:
ScimException
- If the path is 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<URI> getURIValueList(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<URI> getURIValueList(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.
-
-