com.sun.ebxml.registry.util
Class BindingUtility

java.lang.Object
  |
  +--com.sun.ebxml.registry.util.BindingUtility

public class BindingUtility
extends java.lang.Object

Utilities used with castor generated XML Data Binding objects.

Version:
1.2, 05/02/00
Author:
Farrukh S. Najmi

Constructor Summary
protected BindingUtility()
          Class Constructor.
 
Method Summary
 java.lang.StringBuffer getIdListFromIds(java.util.ArrayList ids)
          Get comma delimited list of quoted id from ArrayList of ids.
 java.lang.StringBuffer getIdListFromObjectRefList(org.oasis.ebxml.registry.bindings.rim.ObjectRefList refList)
          Gets a String represnetation of a list ids from an ObjectRefList.
 java.lang.StringBuffer getIdListFromRegistryObjects(java.util.ArrayList objs)
          Gets a String represnetation of a list ids from a Collection of RegistryObjects.
 java.util.ArrayList getIdsFromObjectRefList(org.oasis.ebxml.registry.bindings.rim.ObjectRefList objectRefList)
          Get ArrayList of id of ObjectRef under ObjectRefList.
 java.util.ArrayList getIdsFromRegistryObjects(java.util.ArrayList objs)
          Get ArrayList of id of RegistryObjects
 java.util.ArrayList getIdsFromRequest(java.lang.Object registryRequest)
          Get ArrayList of Id of first-level RegistryObject or ObjectRef in a request.
static BindingUtility getInstance()
          Gets the singleton instance as defined by Singleton pattern.
 java.lang.Object getObjectFromRequest(org.oasis.ebxml.registry.bindings.rs.SubmitObjectsRequest registryRequest, java.lang.String id)
          Get the first-level RegistryObject by id from SubmitObjectsRequest.
 java.lang.String getObjectId(java.lang.Object obj)
          Get the id from an object that could either an ObjectRef or RegistryObject
 java.util.ArrayList getObjectRefIds(org.oasis.ebxml.registry.bindings.rim.LeafRegistryObjectListType objs)
          Get the ArrayList of id of ObjectRef of LeafRegistryObjectList Note: finally no class uses it at the moment
 java.util.ArrayList getRegistryObjectList(org.oasis.ebxml.registry.bindings.rim.LeafRegistryObjectListType objs)
          Get ArrayList of RegistryObject except ObjectRef of LeafRegistryObjectList
 java.util.ArrayList getRegistryObjectsFromIds(java.util.ArrayList objs, java.util.ArrayList ids)
          Filter out those RegistryObjects whose id are in the ArrayList ids
 java.lang.Object getRequestObject(java.io.File file)
          Gets the binding object representing the request from specufied XML file.
 java.lang.Object getRequestObject(java.lang.String rootElement, java.lang.String message)
           
 java.lang.String getRequestRootElement(java.io.InputStream request)
          Gets trhe root element for a registry request
 void setObjectId(java.lang.Object obj, java.lang.String id)
          Set the id for an object that could either an ObjectRef or RegistryObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingUtility

protected BindingUtility()
Class Constructor. Protected and only used by getInstance()

Method Detail

getRegistryObjectList

public java.util.ArrayList getRegistryObjectList(org.oasis.ebxml.registry.bindings.rim.LeafRegistryObjectListType objs)
                                          throws RegistryException
Get ArrayList of RegistryObject except ObjectRef of LeafRegistryObjectList

RegistryException

getObjectRefIds

public java.util.ArrayList getObjectRefIds(org.oasis.ebxml.registry.bindings.rim.LeafRegistryObjectListType objs)
                                    throws RegistryException
Get the ArrayList of id of ObjectRef of LeafRegistryObjectList Note: finally no class uses it at the moment

RegistryException

getObjectId

public java.lang.String getObjectId(java.lang.Object obj)
                             throws RegistryException
Get the id from an object that could either an ObjectRef or RegistryObject

RegistryException

setObjectId

public void setObjectId(java.lang.Object obj,
                        java.lang.String id)
                 throws RegistryException
Set the id for an object that could either an ObjectRef or RegistryObject

RegistryException

getRequestRootElement

public java.lang.String getRequestRootElement(java.io.InputStream request)
                                       throws RegistryException
Gets trhe root element for a registry request

Returns:
the root element as a String
RegistryException

getRequestObject

public java.lang.Object getRequestObject(java.io.File file)
                                  throws RegistryException
Gets the binding object representing the request from specufied XML file.

RegistryException

getRequestObject

public java.lang.Object getRequestObject(java.lang.String rootElement,
                                         java.lang.String message)
                                  throws RegistryException
RegistryException

getIdListFromRegistryObjects

public java.lang.StringBuffer getIdListFromRegistryObjects(java.util.ArrayList objs)
Gets a String represnetation of a list ids from a Collection of RegistryObjects.


getIdsFromRegistryObjects

public java.util.ArrayList getIdsFromRegistryObjects(java.util.ArrayList objs)
Get ArrayList of id of RegistryObjects


getRegistryObjectsFromIds

public java.util.ArrayList getRegistryObjectsFromIds(java.util.ArrayList objs,
                                                     java.util.ArrayList ids)
Filter out those RegistryObjects whose id are in the ArrayList ids


getIdListFromObjectRefList

public java.lang.StringBuffer getIdListFromObjectRefList(org.oasis.ebxml.registry.bindings.rim.ObjectRefList refList)
Gets a String represnetation of a list ids from an ObjectRefList.


getIdListFromIds

public java.lang.StringBuffer getIdListFromIds(java.util.ArrayList ids)
Get comma delimited list of quoted id from ArrayList of ids.


getIdsFromObjectRefList

public java.util.ArrayList getIdsFromObjectRefList(org.oasis.ebxml.registry.bindings.rim.ObjectRefList objectRefList)
Get ArrayList of id of ObjectRef under ObjectRefList.


getObjectFromRequest

public java.lang.Object getObjectFromRequest(org.oasis.ebxml.registry.bindings.rs.SubmitObjectsRequest registryRequest,
                                             java.lang.String id)
                                      throws RegistryException
Get the first-level RegistryObject by id from SubmitObjectsRequest.

RegistryException

getIdsFromRequest

public java.util.ArrayList getIdsFromRequest(java.lang.Object registryRequest)
                                      throws RegistryException
Get ArrayList of Id of first-level RegistryObject or ObjectRef in a request. For those kinds of request having RegistryObject and ObjectRef (e.g. SubmitObjectsRequest), only the id of RegistryObject elements are returned.

RegistryException

getInstance

public static BindingUtility getInstance()
Gets the singleton instance as defined by Singleton pattern.

Returns:
the singleton instance


Copyright © 2001-2003 OASIS. All Rights Reserved.