com.unboundid.scim.marshal.json
Class JsonUnmarshaller

java.lang.Object
  extended by com.unboundid.scim.marshal.json.JsonUnmarshaller
All Implemented Interfaces:
Unmarshaller

public class JsonUnmarshaller
extends Object
implements Unmarshaller

This class provides a SCIM object un-marshaller implementation to read SCIM objects from their JSON representation.


Constructor Summary
JsonUnmarshaller()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonUnmarshaller

public JsonUnmarshaller()
Method Detail

unmarshal

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

Specified by:
unmarshal in interface Unmarshaller
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

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

Specified by:
unmarshalResources in interface Unmarshaller
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

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

Specified by:
unmarshalError in interface Unmarshaller
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

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

Specified by:
bulkUnmarshal in interface Unmarshaller
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

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

Specified by:
bulkUnmarshal in interface Unmarshaller
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.