com.unboundid.scim.sdk
Class ResourceSchemaBackend

java.lang.Object
  extended by com.unboundid.scim.sdk.SCIMBackend
      extended by com.unboundid.scim.sdk.ResourceSchemaBackend

public class ResourceSchemaBackend
extends SCIMBackend

This class provides an implementation of the SCIM server backend API that serves up the resource schema from a collection of ResourceDescriptors.


Constructor Summary
ResourceSchemaBackend(Collection<ResourceDescriptor> resourceDescriptors)
          Create a new ResourceSchemaBackend that serves up the schema provided from the ResourceDescriptors.
 
Method Summary
 boolean authenticate(String userID, String password)
          Perform basic authentication using the provided information.
static ResourceDescriptor copyAndSetIdAndMetaAttributes(ResourceDescriptor resource, ResourceReturningRequest request)
          Make a copy of the ResourceDescriptor and set the id and meta attributes from the provided information.
 void deleteResource(DeleteResourceRequest request)
          Delete a specific resource.
 void finalizeBackend()
          Performs any cleanup which may be necessary when this backend is to be taken out of service.
 ResourceDescriptor getResource(GetResourceRequest request)
          Retrieve all or selected attributes of a resource.
 Resources getResources(GetResourcesRequest request)
          Retrieve selected resources.
 BaseResource postResource(PostResourceRequest request)
          Create a new resource.
 BaseResource putResource(PutResourceRequest request)
          Replace the contents of an existing resource.
 
Methods inherited from class com.unboundid.scim.sdk.SCIMBackend
getConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceSchemaBackend

public ResourceSchemaBackend(Collection<ResourceDescriptor> resourceDescriptors)
Create a new ResourceSchemaBackend that serves up the schema provided from the ResourceDescriptors.

Parameters:
resourceDescriptors - The ResourceDescriptors to serve.
Method Detail

authenticate

public boolean authenticate(String userID,
                            String password)
Perform basic authentication using the provided information.

Specified by:
authenticate in class SCIMBackend
Parameters:
userID - The user ID to be authenticated.
password - The user password to be verified.
Returns:
true if the provided user ID and password are valid.

finalizeBackend

public void finalizeBackend()
Performs any cleanup which may be necessary when this backend is to be taken out of service.

Specified by:
finalizeBackend in class SCIMBackend

getResource

public ResourceDescriptor getResource(GetResourceRequest request)
                               throws SCIMException
Retrieve all or selected attributes of a resource.

Specified by:
getResource in class SCIMBackend
Parameters:
request - The Get Resource request.
Returns:
The response to the request.
Throws:
SCIMException - if an error occurs while processing the request.

getResources

public Resources getResources(GetResourcesRequest request)
                       throws SCIMException
Retrieve selected resources.

Specified by:
getResources in class SCIMBackend
Parameters:
request - The Get Resources request.
Returns:
The response to the request.
Throws:
SCIMException - if an error occurs while processing the request.

postResource

public BaseResource postResource(PostResourceRequest request)
                          throws SCIMException
Create a new resource.

Specified by:
postResource in class SCIMBackend
Parameters:
request - The Post Resource request.
Returns:
The response to the request.
Throws:
SCIMException - if an error occurs while processing the request.

deleteResource

public void deleteResource(DeleteResourceRequest request)
                    throws SCIMException
Delete a specific resource.

Specified by:
deleteResource in class SCIMBackend
Parameters:
request - The Delete Resource request.
Throws:
SCIMException - if an error occurs while processing the request.

putResource

public BaseResource putResource(PutResourceRequest request)
                         throws SCIMException
Replace the contents of an existing resource.

Specified by:
putResource in class SCIMBackend
Parameters:
request - The Put Resource request.
Returns:
The response to the request.
Throws:
SCIMException - if an error occurs while processing the request.

copyAndSetIdAndMetaAttributes

public static ResourceDescriptor copyAndSetIdAndMetaAttributes(ResourceDescriptor resource,
                                                               ResourceReturningRequest request)
Make a copy of the ResourceDescriptor and set the id and meta attributes from the provided information.

Parameters:
resource - The SCIM object whose id and meta attributes are to be set.
request - The SCIM request.
Returns:
The copy of the ResourceDescriptor.


Copyright © 2011-2012 UnboundID. All Rights Reserved.