|
Oracle® Application Server Web Services UDDI Client API Reference 10g Release 2 (10.1.2) Part No. B13971-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.uddi.message.UddiElement
oracle.uddi.message.util.UddiElementBag
A data structure that holds a bag of UddiElements of the same typ. Examples include CategoryBag, discoveryURLs, etc.
BagRandomAccessor
, BagSequentialAccessor
Constructor Summary | |
UddiElementBag(UddiElementFactory ueFactory) |
Method Summary | |
boolean |
addUddiElement(UddiElement uddiElt) Convenient method to add a UDDI Element to the bag. |
static UddiElementIterator |
getOrCreateUddiElementIterator(UddiElementBag uddiEltBag) A helper method that returns an existing UddiElementIterator when available, or constructing a new UddiElementIterator when the sub elements are in a List. |
static java.util.List |
getOrCreateUddiElementList(UddiElementBag uddiEltBag) A helper method that returns an existing List of sub UddiElements when available, or constructing a new List when the sub elements are in an UddiElementIterator. |
UddiElement |
getUddiElement(int index) Convenient method to get a UDDI Element from the bag. |
UddiElementIterator |
getUddiElementIterator() |
java.util.List |
getUddiElementList() |
boolean |
hasEmptyContent() Returns true if there is no sub UddiElement contained in this bag. |
void |
init() This method is not intended for use by clients of the API. |
void |
initWithEmptyList() Initalize the element with an empty list to hold sub UDDI elements. |
boolean |
removeUddiElement(UddiElement uddiElt) Convenient method to remove a UDDI Element from the bag. |
void |
setUddiElementIterator(UddiElementIterator uitr) |
void |
setUddiElementList(java.util.List listUddiElt) |
Methods inherited from class oracle.uddi.message.UddiElement |
getElementName, getElementPrefix, getGeneric, getNamespaceUri, getTagName, getUddiElementFactory, getVersion, isV1Compatible, isV2Compatible, marshall, unmarshall |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UddiElementBag(UddiElementFactory ueFactory)
Method Detail |
public void init()
UddiElement
This method is not intended for use by clients of the API.
Initalizes the element. If the element has been initalized, it re-initalizes the element so that it is as if it is a new object. This method enables object reuse.
Note on re-initalization: Reinitalization is done such that the object will be in the state as if it is a new object. It implies that all sub-elements will be discarded. If the caller wants to re-use sub-elements, it is caller's responsibility to get the sub-elements prior to re-initalization and reassign the optional sub-elements after re-initalization.
For example, A tModel
contains an optional sub-element identifierBag
. Hence identifierBag
will be discarded. If the caller wishes to re-use the identifierBag
, the caller has to get the identifierBag
, re-initalize it and assign it back as the tModel's identifierBag
:
... IdentifierBag identifierBag = tModel.getIdentifierBag(); tModel.init(); identifierBag.init(); tModel.setIdentifierBag(identifierBag); ...
Access to UddiElement and its sub-structure is not guaranteed to be thread-safe.
Every subclass of UddiElement MUST overwrite init(). In the implementation, it should always invoke super.init() and intialize/reinitialize subclass-specific members. The pattern is exactly the same as a Java constructor.
init
in class UddiElement
public void initWithEmptyList()
public void setUddiElementList(java.util.List listUddiElt) throws SequentialAccessOnlyException
setUddiElementList
in interface BagRandomAccessor
SequentialAccessOnlyException
public java.util.List getUddiElementList() throws SequentialAccessOnlyException
getUddiElementList
in interface BagRandomAccessor
SequentialAccessOnlyException
public boolean addUddiElement(UddiElement uddiElt) throws SequentialAccessOnlyException
SequentialAccessOnlyException
public boolean removeUddiElement(UddiElement uddiElt) throws SequentialAccessOnlyException
SequentialAccessOnlyException
public UddiElement getUddiElement(int index) throws SequentialAccessOnlyException
SequentialAccessOnlyException
public UddiElementIterator getUddiElementIterator() throws RandomAccessOnlyException
getUddiElementIterator
in interface BagSequentialAccessor
RandomAccessOnlyException
public void setUddiElementIterator(UddiElementIterator uitr) throws RandomAccessOnlyException
setUddiElementIterator
in interface BagSequentialAccessor
RandomAccessOnlyException
public boolean hasEmptyContent() throws MarshallException
hasEmptyContent
in class UddiElement
MarshallException
public static java.util.List getOrCreateUddiElementList(UddiElementBag uddiEltBag) throws UddiException
A helper method that returns an existing List of sub UddiElements when available, or constructing a new List when the sub elements are in an UddiElementIterator.
Side effects: if the sub elements are in an UddiElementIterator, the iterator will be consumed.
uddiEltBag
- the UddiElementBag that contains some sub elements.UddiException
public static UddiElementIterator getOrCreateUddiElementIterator(UddiElementBag uddiEltBag)
uddiEltBag
- the UddiElementBag that contains some sub elements.
|
Oracle® Application Server Web Services UDDI Client API Reference 10g Release 2 (10.1.2) Part No. B13971-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |