com.unboundid.scim.marshal
Interface Unmarshaller

All Known Implementing Classes:
JsonUnmarshaller, XmlUnmarshaller

public interface Unmarshaller

This interface provides methods that may be used to read SCIM objects from their external representation. There are un-marshaller implementations for XML and JSON. Un-marshaller implementations are required to be thread-safe.


Method Summary
 void bulkUnmarshal(File file, BulkConfig bulkConfig, BulkContentHandler handler)
          Reads a SCIM bulk request or response from a file.
 void bulkUnmarshal(InputStream inputStream, BulkConfig bulkConfig, BulkContentHandler handler)
          Reads a SCIM bulk request or response from an input stream.
<R extends BaseResource>
R
unmarshal(InputStream inputStream, ResourceDescriptor resourceDescriptor, ResourceFactory<R> resourceFactory)
          Reads a SCIM resource from an input stream.
 SCIMException unmarshalError(InputStream inputStream)
          Reads a SCIM error response from an input stream.
<R extends BaseResource>
Resources<R>
unmarshalResources(InputStream inputStream, ResourceDescriptor resourceDescriptor, ResourceFactory<R> resourceFactory)
          Reads a SCIM query response from an input stream.
 

Method Detail

unmarshal

<R extends BaseResource> R unmarshal(InputStream inputStream,
                                     ResourceDescriptor resourceDescriptor,
                                     ResourceFactory<R> resourceFactory)
                                 throws InvalidResourceException
Reads a SCIM resource from an input stream.

Type Parameters:
R - The type of resource instance.
Parameters:
inputStream - The input stream containing the SCIM object to be read.
resourceDescriptor - The descriptor of the SCIM resource to be read.
resourceFactory - The resource factory to use to create the resource instance.
Returns:
The SCIM resource that was read.
Throws:
InvalidResourceException - If an error occurred.

unmarshalResources

<R extends BaseResource> Resources<R> unmarshalResources(InputStream inputStream,
                                                         ResourceDescriptor resourceDescriptor,
                                                         ResourceFactory<R> resourceFactory)
                                                     throws InvalidResourceException
Reads a SCIM query response from an input stream.

Type Parameters:
R - The type of resource instance.
Parameters:
inputStream - The input stream containing the SCIM object to be read.
resourceDescriptor - The descriptor of the SCIM resource to be read.
resourceFactory - The resource factory to use to create the resource instance.
Returns:
The SCIM query response that was read.
Throws:
InvalidResourceException - If an error occurred.

unmarshalError

SCIMException unmarshalError(InputStream inputStream)
                             throws InvalidResourceException
Reads a SCIM error response from an input stream.

Parameters:
inputStream - The input stream containing the SCIM object to be read.
Returns:
The SCIM error response that was read.
Throws:
InvalidResourceException - If an error occurred.

bulkUnmarshal

void bulkUnmarshal(InputStream inputStream,
                   BulkConfig bulkConfig,
                   BulkContentHandler handler)
                   throws SCIMException
Reads a SCIM bulk request or response from an input stream.

Parameters:
inputStream - The input stream containing the bulk content to be read.
bulkConfig - The bulk configuration settings to be enforced.
handler - A bulk operation listener to handle the content as it is read.
Throws:
SCIMException - If the bulk content could not be read.

bulkUnmarshal

void bulkUnmarshal(File file,
                   BulkConfig bulkConfig,
                   BulkContentHandler handler)
                   throws SCIMException
Reads a SCIM bulk request or response from a file.

Parameters:
file - The file containing the bulk content to be read.
bulkConfig - The bulk configuration settings to be enforced.
handler - A bulk operation listener to handle the content as it is read.
Throws:
SCIMException - If the bulk content could not be read.


Copyright © 2011-2012 UnboundID. All Rights Reserved.