public class SCIMObject extends Object
| Constructor and Description |
|---|
SCIMObject()
Create an empty SCIM object that initially has no attributes.
|
SCIMObject(SCIMObject scimObject)
Create a new copy of the provided SCIM object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAttribute(SCIMAttribute attribute)
Adds the provided attribute to this object.
|
void |
checkSchema(ResourceDescriptor resourceDescriptor,
boolean includeCommonAttributes)
Check this object for potential schema violations based on the provided
resource descriptor.
|
boolean |
equals(Object o) |
SCIMAttribute |
getAttribute(String schema,
String name)
Retrieves the attribute with the specified name.
|
Collection<SCIMAttribute> |
getAttributes(String schema)
Retrieves the set of attributes in this object from the specified schema.
|
Set<String> |
getSchemas()
Retrieves the set of schemas currently contributing attributes to this
object.
|
boolean |
hasAttribute(String schema,
String name)
Determines whether this object contains the specified attribute or
sub-attribute.
|
int |
hashCode() |
boolean |
hasSchema(String schema)
Determines whether this object contains any attributes in the specified
schema.
|
boolean |
matchesFilter(SCIMFilter filter)
Determine whether this object matches the provided filter parameters.
|
boolean |
removeAttribute(String schema,
String name)
Removes the specified attribute or sub-attribute from this object.
|
void |
setAttribute(SCIMAttribute attribute)
Adds the provided attribute to this object, replacing any existing
attribute with the same name.
|
String |
toString() |
public SCIMObject()
public SCIMObject(SCIMObject scimObject)
scimObject - The SCIMObject to copy.public Set<String> getSchemas()
public boolean hasSchema(String schema)
schema - The URI of the schema for which to make the determination.
It must not be null.true if this object contains any attributes in the
specified schema, or false if not.public SCIMAttribute getAttribute(String schema, String name)
Note that this method does not support retrieving sub-attributes directly; you can retrieve a SCIMAttribute and then iterate over its values to get the sub-attributes, if the values are complex.
schema - The URI of the schema containing the attribute to retrieve.name - The name of the attribute to retrieve. It must not be
null.null if the
specified attribute is not present in this object.public Collection<SCIMAttribute> getAttributes(String schema)
schema - The URI of the schema whose attributes are to be retrieved.public boolean hasAttribute(String schema, String name)
schema - The URI of the schema containing the attribute.name - The name of the attribute or sub-attribute.
Sub-attributes can be referenced with the standard
attribute notation (i.e. "attribute.subattribute".
This parameter must not be null.true if this object contains the specified attribute, or
false if not.public boolean addAttribute(SCIMAttribute attribute)
attribute - The attribute to be added. It must not be null.true if the object was updated, or false if the
object already contained an attribute with the same name.public void setAttribute(SCIMAttribute attribute)
attribute - The attribute to be added. It must not be null.public boolean removeAttribute(String schema, String name)
schema - The URI of the schema to which the attribute belongs.name - The name of the attribute or sub-attribute to remove.
Sub-attributes can be referenced with the standard
attribute notation (i.e. "attribute.subattribute".
This parameter must not be null.true if the attribute was removed from the object, or
false if it was not present.public boolean matchesFilter(SCIMFilter filter)
filter - The filter parameters to compare against the object.true if this object matches the provided filter, and
false otherwise.public void checkSchema(ResourceDescriptor resourceDescriptor, boolean includeCommonAttributes) throws InvalidResourceException
resourceDescriptor - The ResourceDescriptor to check against.includeCommonAttributes - Whether to enforce the schema for common
attributes like id and meta.InvalidResourceException - If a schema violation is found.Copyright © 2011–2016 UnboundID. All rights reserved.