public class ResourceDescriptor extends BaseResource
| Modifier and Type | Field and Description |
|---|---|
static ResourceFactory<ResourceDescriptor> |
RESOURCE_DESCRIPTOR_FACTORY
A
ResourceFactory for creating ResourceDescriptor
instances. |
BASE_RESOURCE_FACTORY| Modifier and Type | Method and Description |
|---|---|
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 |
findAttribute(String schema,
String name)
Retrieves the attribute descriptor for a specified attribute, if the
attribute name is defined.
|
String |
findAttributeSchema(String name,
String... preferredSchemas)
Retrieves the schema for a specified attribute name.
|
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() |
boolean |
isStrictMode()
Gets the "strict mode" setting for this ResourceDescriptor.
|
void |
setStrictMode(boolean strictMode)
Sets the "strict mode" for this ResourceDescriptor.
|
String |
toString() |
addOrReplaceMultiValuedValue, addOrReplaceMultiValuedValue, getAttributeValues, getComplexAttributeValue, getComplexAttributeValue, getExternalId, getId, getMeta, getMultiValuedAttribute, getMultiValuedAttribute, getResourceDescriptor, getScimObject, getSimpleAttributeValue, getSimpleAttributeValue, getSingularAttributeValue, marshal, setAttributeValues, setComplexAttribute, setComplexAttribute, setExternalId, setId, setMeta, setMultiValuedAttribute, setMultiValuedAttribute, setSimpleAttribute, setSimpleAttribute, setSingularAttributeValuepublic static final ResourceFactory<ResourceDescriptor> RESOURCE_DESCRIPTOR_FACTORY
ResourceFactory for creating ResourceDescriptor
instances.public AttributeDescriptor getAttribute(String schema, String name) throws InvalidResourceException
schema - The attribute descriptor's associated schema URN.name - The name of the attribute whose descriptor is to be retrieved.InvalidResourceException - if there is no such attribute.public AttributeDescriptor findAttribute(String schema, String name)
getAttribute but
returns null rather than throwing an exception if the attribute is
not defined.schema - The attribute descriptor's associated schema URI.name - The name of the attribute whose descriptor is to be retrieved.public Collection<AttributeDescriptor> getAttributes(String schema)
schema - The name of the schema.public Set<String> getAttributeSchemas()
public String findAttributeSchema(String name, String... preferredSchemas)
name - The name of the attribute whose schema is to be found.preferredSchemas - an ordered list of schemas to prefer when matchingnull if there is
no such attribute name in any schema.public String getName()
null.public void setStrictMode(boolean strictMode)
getAttribute(String, String) where the requested
attribute does not exist in the attributesCache will result in the method
generating an AttributeDescriptor on the fly. If strict mode were on in
this case, it would throw an exception because that attribute was not
defined.strictMode - a boolean indicating whether to use strict mode or not.public boolean isStrictMode()
getAttribute(String, String) where the
requested attribute does not exist in the attributesCache will result in
the method generating an AttributeDescriptor on the fly. If strict mode
were on in this case, it would throw an exception because that attribute
was not defined.public Collection<AttributeDescriptor> getAttributes()
null.public String getSchema()
public String getDescription()
public String getEndpoint()
public int hashCode()
hashCode in class BaseResourcepublic boolean equals(Object obj)
equals in class BaseResourcepublic String toString()
BaseResourcetoString in class BaseResourcepublic static ResourceDescriptor create(String name, String description, String schema, String endpoint, AttributeDescriptor... attributes)
name - The addressable Resource endpoint name.description - The Resource's human readable description.schema - The Resource's associated schema URNendpoint - The Resource's HTTP addressable endpoint relative
to the Base URL.attributes - Specifies the set of associated Resource attributes.Copyright © 2011–2016 UnboundID. All rights reserved.