com.unboundid.scim.sdk
Class SCIMQueryAttributes

java.lang.Object
  extended by com.unboundid.scim.sdk.SCIMQueryAttributes

public class SCIMQueryAttributes
extends Object

This class represents a list of query attributes taken from the attributes query parameter. e.g. attributes=name.formatted,userName


Constructor Summary
SCIMQueryAttributes(ResourceDescriptor resourceDescriptor, String attributes)
          Create a new instance of query attributes from their string representation.
 
Method Summary
 boolean allAttributesRequested()
          Determine whether all attributes and sub-attributes are requested by these query attributes.
 boolean isAttributeRequested(AttributeDescriptor attributeDescriptor)
          Determine whether the specified attribute is requested by these query attributes.
 SCIMQueryAttributes merge(SCIMQueryAttributes that)
          Return query attributes formed by merging these query attributes with the provided query attributes.
 SCIMAttribute pareAttribute(SCIMAttribute attribute)
          Pare down an attribute to its requested sub-attributes.
 SCIMObject pareObject(SCIMObject scimObject)
          Pare down a SCIM object to its requested attributes.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SCIMQueryAttributes

public SCIMQueryAttributes(ResourceDescriptor resourceDescriptor,
                           String attributes)
                    throws InvalidResourceException
Create a new instance of query attributes from their string representation.

Parameters:
resourceDescriptor - The resource descriptor for the SCIM endpoint.
attributes - The attributes query parameter specifying the set of attributes or sub-attributes requested, or null if all attributes and sub-attributes are requested. The attributes must be qualified by their schema URI if they are not in the core schema.
Throws:
InvalidResourceException - If one of the specified attributes does not exist.
Method Detail

allAttributesRequested

public boolean allAttributesRequested()
Determine whether all attributes and sub-attributes are requested by these query attributes.

Returns:
true if all attributes and sub-attributes are requested, and false otherwise.

isAttributeRequested

public boolean isAttributeRequested(AttributeDescriptor attributeDescriptor)
Determine whether the specified attribute is requested by these query attributes.

Parameters:
attributeDescriptor - The attribute for which to make the determination.
Returns:
true if the specified attribute is requested, or false otherwise.

pareObject

public SCIMObject pareObject(SCIMObject scimObject)
Pare down a SCIM object to its requested attributes.

Parameters:
scimObject - The SCIM object to be pared down.
Returns:
The pared down SCIM object.

pareAttribute

public SCIMAttribute pareAttribute(SCIMAttribute attribute)
Pare down an attribute to its requested sub-attributes.

Parameters:
attribute - The attribute to be pared down.
Returns:
The pared down attribute, or null if the attribute should not be included at all.

merge

public SCIMQueryAttributes merge(SCIMQueryAttributes that)
                          throws InvalidResourceException
Return query attributes formed by merging these query attributes with the provided query attributes.

Parameters:
that - The query attributes to be merged with these query attributes to form new query attributes.
Returns:
The merged query attributes.
Throws:
InvalidResourceException - If the query attributes could not be merged.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011-2012 UnboundID. All Rights Reserved.