com.unboundid.scim.schema
Class ResourceDescriptor

java.lang.Object
  extended by com.unboundid.scim.data.BaseResource
      extended by com.unboundid.scim.schema.ResourceDescriptor
All Implemented Interfaces:
SCIMResponse

public class ResourceDescriptor
extends BaseResource

This class provides methods that describe the schema for a SCIM resource. It may be used to help read and write SCIM objects in their external XML and JSON representation, and to convert SCIM objects to and from LDAP entries.


Field Summary
static ResourceFactory<ResourceDescriptor> RESOURCE_DESCRIPTOR_FACTORY
          A ResourceFactory for creating ResourceDescriptor instances.
 
Fields inherited from class com.unboundid.scim.data.BaseResource
BASE_RESOURCE_FACTORY
 
Method Summary
static ResourceDescriptor create(String name, String description, String schema, String endpoint, AttributeDescriptor... attributes)
          Construct a new resource descriptor with the provided information.
 boolean equals(Object obj)
          
 AttributeDescriptor getAttribute(String schema, String name)
          Retrieves the attribute descriptor for a specified attribute.
 Collection<AttributeDescriptor> getAttributes()
          Retrieves the list of all attribute descriptors defined in the resource.
 Collection<AttributeDescriptor> getAttributes(String schema)
          Retrieves all the attribute descriptors of the provided schema defined in the resource.
 Set<String> getAttributeSchemas()
          Retrieves the set of unique schemas for the attribute descriptors defined in the resource.
 String getDescription()
          Retrieves the resource's human readable description.
 String getEndpoint()
          Retrieves the Resource's HTTP addressable endpoint relative to the Base URL.
 String getName()
          Retrieve the name of the resource to be used in any external representation of the resource.
 String getSchema()
          Returns the resource's XML schema (namespace) name.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class com.unboundid.scim.data.BaseResource
getAttributeValues, getExternalId, getId, getMeta, getResourceDescriptor, getScimObject, getSingularAttributeValue, marshal, setAttributeValues, setExternalId, setId, setMeta, setSingularAttributeValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE_DESCRIPTOR_FACTORY

public static final ResourceFactory<ResourceDescriptor> RESOURCE_DESCRIPTOR_FACTORY
A ResourceFactory for creating ResourceDescriptor instances.

Method Detail

getAttribute

public AttributeDescriptor getAttribute(String schema,
                                        String name)
                                 throws InvalidResourceException
Retrieves the attribute descriptor for a specified attribute.

Parameters:
schema - The attribute descriptor's associated schema URN.
name - The name of the attribute whose descriptor is to be retrieved.
Returns:
The attribute descriptor for the specified attribute.
Throws:
InvalidResourceException - if there is no such attribute.

getAttributes

public Collection<AttributeDescriptor> getAttributes(String schema)
Retrieves all the attribute descriptors of the provided schema defined in the resource.

Parameters:
schema - The name of the schema.
Returns:
All the attribute descriptors of the provided schema defined for this resource.

getAttributeSchemas

public Set<String> getAttributeSchemas()
Retrieves the set of unique schemas for the attribute descriptors defined in the resource.

Returns:
The set of unique schemas for the attribute descriptors defined in the resource.

getName

public String getName()
Retrieve the name of the resource to be used in any external representation of the resource.

Returns:
Retrieve the name of the resource to be used in any external representation of the resource. It is never null.

getAttributes

public Collection<AttributeDescriptor> getAttributes()
Retrieves the list of all attribute descriptors defined in the resource.

Returns:
The list of attribute descriptors for the resource. It is never null.

getSchema

public String getSchema()
Returns the resource's XML schema (namespace) name.

Returns:
The XML namespace name.

getDescription

public String getDescription()
Retrieves the resource's human readable description.

Returns:
The resource's human readable description.

getEndpoint

public String getEndpoint()
Retrieves the Resource's HTTP addressable endpoint relative to the Base URL.

Returns:
The Resource's HTTP addressable endpoint relative to the Base URL.

hashCode

public int hashCode()

Overrides:
hashCode in class BaseResource

equals

public boolean equals(Object obj)

Overrides:
equals in class BaseResource

toString

public String toString()
Description copied from class: BaseResource

Overrides:
toString in class BaseResource

create

public static ResourceDescriptor create(String name,
                                        String description,
                                        String schema,
                                        String endpoint,
                                        AttributeDescriptor... attributes)
Construct a new resource descriptor with the provided information. The resource attributes specified here should not include common core attributes (ie. id, externalId, meta) as these will be added automatically.

Parameters:
name - The addressable Resource endpoint name.
description - The Resource's human readable description.
schema - The Resource's associated schema URN
endpoint - The Resource's HTTP addressable endpoint relative to the Base URL.
attributes - Specifies the set of associated Resource attributes.
Returns:
The newly constructed resource descriptor.


Copyright © 2011-2012 UnboundID. All Rights Reserved.