gov.nih.nci.cagrid.wsenum.utils
Class EnumerateResponseFactory

java.lang.Object
  extended by gov.nih.nci.cagrid.wsenum.utils.EnumerateResponseFactory

public class EnumerateResponseFactory
extends java.lang.Object

EnumerateResponseFactory Utility to create Enumeration resources, set up Enum Iterators, and finally create EnumerateResponses

Version:
$Id: EnumerateResponseFactory.java,v 1.1 2007/05/16 15:00:57 dervin Exp $
Author:
David W. Ervin

Constructor Summary
EnumerateResponseFactory()
           
 
Method Summary
static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createCustomResponse(org.globus.ws.enumeration.EnumIterator iter, boolean persist)
          Creates an enumeration response using a custom EnumIterator and the default ExpirationType.
static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createCustomResponse(org.globus.ws.enumeration.EnumIterator iter, boolean persist, org.xmlsoap.schemas.ws._2004._09.enumeration.ExpirationType expiration)
          Creates an enumeration response using a custom EnumIterator and the supplied ExpirationType.
static EnumerationResponseContainer createEnumerationResponse(org.globus.ws.enumeration.EnumIterator enumIter)
           
static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createInMemoryResponse(java.util.List enumObjects, javax.xml.namespace.QName objectQName)
          Creates an enumerate response using an in-memory SimpleEnumIterator, using the default ExpirationType
static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createInMemoryResponse(java.util.List enumObjects, javax.xml.namespace.QName objectQName, org.xmlsoap.schemas.ws._2004._09.enumeration.ExpirationType expiration)
          Creates an enumerate response using an in-memory SimpleEnumIterator using the provided expiration information
static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createPersistantResponse(java.util.List enumObjects, javax.xml.namespace.QName objectQName)
          Creates an enumerate response using an IndexedObjectFileEnumIterator.
static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createPersistantResponse(java.util.List enumObjects, javax.xml.namespace.QName objectQName, org.xmlsoap.schemas.ws._2004._09.enumeration.ExpirationType expiration)
          Creates an enumerate response using an IndexedObjectFileEnumIterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerateResponseFactory

public EnumerateResponseFactory()
Method Detail

createEnumerationResponse

public static EnumerationResponseContainer createEnumerationResponse(org.globus.ws.enumeration.EnumIterator enumIter)
                                                              throws EnumerationCreationException
Throws:
EnumerationCreationException

createInMemoryResponse

public static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createInMemoryResponse(java.util.List enumObjects,
                                                                                                    javax.xml.namespace.QName objectQName)
                                                                                             throws EnumerationCreationException
Creates an enumerate response using an in-memory SimpleEnumIterator, using the default ExpirationType

Parameters:
enumObjects - The list of objects to enumerate over
objectQName - The QName of the objects
Returns:
An enumerate response instance
Throws:
EnumerationCreationException

createInMemoryResponse

public static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createInMemoryResponse(java.util.List enumObjects,
                                                                                                    javax.xml.namespace.QName objectQName,
                                                                                                    org.xmlsoap.schemas.ws._2004._09.enumeration.ExpirationType expiration)
                                                                                             throws EnumerationCreationException
Creates an enumerate response using an in-memory SimpleEnumIterator using the provided expiration information

Parameters:
enumObjects - The list of objects to enumerate over
objectQName - The QName of the objects
expiration - The expiration information for the newly created resource
Returns:
An enumerate response instance
Throws:
EnumerationCreationException

createPersistantResponse

public static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createPersistantResponse(java.util.List enumObjects,
                                                                                                      javax.xml.namespace.QName objectQName)
                                                                                               throws EnumerationCreationException
Creates an enumerate response using an IndexedObjectFileEnumIterator. This requires that all the objects given to this method must implement the java.io.Serializable interface. The default ExpirationType will be used.

Parameters:
enumObjects - The list of objects to be enumerated
objectQName - The QName of the objects
Returns:
An enumerate response instance
Throws:
EnumerationCreationException

createPersistantResponse

public static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createPersistantResponse(java.util.List enumObjects,
                                                                                                      javax.xml.namespace.QName objectQName,
                                                                                                      org.xmlsoap.schemas.ws._2004._09.enumeration.ExpirationType expiration)
                                                                                               throws EnumerationCreationException
Creates an enumerate response using an IndexedObjectFileEnumIterator. This requires that all the objects given to this method must implement the java.io.Serializable interface. The given ExpirationType will be used to specify lifetime of the enumeration.

Parameters:
enumObjects - The list of objects to be enumerated
objectQName - The QName of the objects
expiration - The expiration information for the enumeration
Returns:
An enumerate response instance
Throws:
EnumerationCreationException

createCustomResponse

public static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createCustomResponse(org.globus.ws.enumeration.EnumIterator iter,
                                                                                                  boolean persist)
                                                                                           throws EnumerationCreationException
Creates an enumeration response using a custom EnumIterator and the default ExpirationType.

Parameters:
iter - The custom EnumIter implementation to use
persist - If true, the iterator will have it's contents serialized to disk. This requires the objects returned by the iterator implement java.io.Serializable
Returns:
An enumerate response instance
Throws:
EnumerationCreationException

createCustomResponse

public static org.xmlsoap.schemas.ws._2004._09.enumeration.EnumerateResponse createCustomResponse(org.globus.ws.enumeration.EnumIterator iter,
                                                                                                  boolean persist,
                                                                                                  org.xmlsoap.schemas.ws._2004._09.enumeration.ExpirationType expiration)
                                                                                           throws EnumerationCreationException
Creates an enumeration response using a custom EnumIterator and the supplied ExpirationType.

Parameters:
iter - The custom EnumIter implementation to use
persist - If true, the iterator will have it's contents serialized to disk. This requires the objects returned by the iterator implement java.io.Serializable
expiration - The expiration information to use for the enumeration's lifetime.
Returns:
An enumerate response instance
Throws:
EnumerationCreationException