public class BaseResource extends Object implements SCIMResponse
| Modifier and Type | Field and Description |
|---|---|
static ResourceFactory<BaseResource> |
BASE_RESOURCE_FACTORY
A
ResourceFactory for creating BaseResource
instances. |
| Constructor and Description |
|---|
BaseResource(ResourceDescriptor resourceDescriptor)
Construct an empty
BaseResource with the specified
ResourceDescriptor. |
BaseResource(ResourceDescriptor resourceDescriptor,
SCIMObject scimObject)
Construct a
BaseResource with the specified
ResourceDescriptor and backed by the given
SCIMObject. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
<T> Collection<T> |
getAttributeValues(String schema,
String name,
AttributeValueResolver<T> resolver)
Retrieves a multi-valued attribute value.
|
String |
getExternalId()
Retrieves the unique identifier for the Resource as defined by the
Service Consumer.
|
String |
getId()
Retrieves the unique identifier for the SCIM Resource as defined by
the Service Provider.
|
Meta |
getMeta()
Retrieves the metadata about the resource.
|
ResourceDescriptor |
getResourceDescriptor()
Retrieves the
ResourceDescriptor for this resource. |
SCIMObject |
getScimObject()
Retrieves the
SCIMObject wrapped by this resource. |
<T> T |
getSingularAttributeValue(String schema,
String name,
AttributeValueResolver<T> resolver)
Retrieves a singular attribute value.
|
int |
hashCode() |
void |
marshal(Marshaller marshaller,
OutputStream outputStream)
Marshals this response using the specified
Marshaller to the
specified OutputStream. |
<T> void |
setAttributeValues(String schema,
String name,
AttributeValueResolver<T> resolver,
Collection<T> values)
Sets a multi-valued attribute value.
|
void |
setExternalId(String externalId)
Sets the unique identifier for the Resource as defined by the Service
Consumer.
|
void |
setId(String id)
Sets the unique identifier for the SCIM Resource.
|
void |
setMeta(Meta meta)
Sets the metadata about the resource.
|
<T> void |
setSingularAttributeValue(String schema,
String name,
AttributeValueResolver<T> resolver,
T value)
Sets a singular attribute value.
|
String |
toString() |
public static final ResourceFactory<BaseResource> BASE_RESOURCE_FACTORY
ResourceFactory for creating BaseResource
instances.public BaseResource(ResourceDescriptor resourceDescriptor, SCIMObject scimObject)
BaseResource with the specified
ResourceDescriptor and backed by the given
SCIMObject.resourceDescriptor - The resource descriptor for this SCIM resource.scimObject - The SCIMObject containing all the
SCIM attributes and their values.public BaseResource(ResourceDescriptor resourceDescriptor)
BaseResource with the specified
ResourceDescriptor.resourceDescriptor - The resource descriptor for this SCIM resource.public ResourceDescriptor getResourceDescriptor()
ResourceDescriptor for this resource.ResourceDescriptor for this resource.public SCIMObject getScimObject()
SCIMObject wrapped by this resource.SCIMObject wrapped by this resource.public String getId()
public void setId(String id)
id - The unique identifier for the SCIM Resource.public String getExternalId()
public void setExternalId(String externalId)
externalId - The unique identifier for the Resource as defined by the
Service Consumer.public Meta getMeta()
public void setMeta(Meta meta)
meta - The metadata about the resource.public <T> T getSingularAttributeValue(String schema, String name, AttributeValueResolver<T> resolver)
T - The type of the resolved instance representing the value of
sub-attribute.schema - The schema URI of the attribute value to retrieve.name - The name of the attribute value to retrieve.resolver - The AttributeValueResolver the should be used
to resolve the value to an instance.null if the specified
attribute does not exist.public <T> void setSingularAttributeValue(String schema, String name, AttributeValueResolver<T> resolver, T value) throws InvalidResourceException
T - The type of the resolved instance representing the value of
sub-attribute.schema - The schema URI of the attribute value to retrieve.name - The name of the attribute value to retrieve.resolver - The AttributeValueResolver the should be used
to resolve the instance to attribute value.value - The value instance.InvalidResourceException - if the attribute is not defined by the
resource.public <T> Collection<T> getAttributeValues(String schema, String name, AttributeValueResolver<T> resolver)
T - The type of the resolved instance representing the value of
sub-attribute.schema - The schema URI of the attribute value to retrieve.name - The name of the attribute value to retrieve.resolver - The AttributeValueResolver the should be used
to resolve the value to an instance.null if
the specified attribute does not exist.public <T> void setAttributeValues(String schema, String name, AttributeValueResolver<T> resolver, Collection<T> values) throws InvalidResourceException
T - The type of the resolved instance representing the value of
sub-attribute.schema - The schema URI of the attribute value to retrieve.name - The name of the attribute value to retrieve.resolver - The AttributeValueResolver the should be used
to resolve the instance to attribute value.values - The value instances.InvalidResourceException - if the attribute is not defined by the
resource.public void marshal(Marshaller marshaller, OutputStream outputStream) throws Exception
Marshaller to the
specified OutputStream.marshal in interface SCIMResponsemarshaller - The Marshaller to use.outputStream - The OutputStream to write to.Exception - if an error occurs while performing the marshaling.Copyright © 2011-2013 UnboundID. All Rights Reserved.