|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.unboundid.scim.data.BaseResource
public class BaseResource
This class represents a SCIM resource. It could also be sub-typed for specific resource types (ie. Users or Groups) that provide convenience methods for accessing specific attribute values.
| Field Summary | |
|---|---|
static ResourceFactory<BaseResource> |
BASE_RESOURCE_FACTORY
A ResourceFactory for creating BaseResource
instances. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object o)
|
|
|
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. |
|
|
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. |
|
|
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. |
|
|
setSingularAttributeValue(String schema,
String name,
AttributeValueResolver<T> resolver,
T value)
Sets a singular attribute value. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final ResourceFactory<BaseResource> BASE_RESOURCE_FACTORY
ResourceFactory for creating BaseResource
instances.
| Constructor Detail |
|---|
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.| Method Detail |
|---|
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.public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||