Class Contacts

  • All Implemented Interfaces:
    java.io.Serializable

    public class Contacts
    extends UDDIElement
    Represents the contacts element within the UDDI version 2.0 schema. This class contains the following types of methods:
    • Constructor passing required fields.
    • Constructor that will instantiate the object from an appropriate XML DOM element.
    • Get/set methods for each attribute that this element can contain.
    • A get/setVector method is provided for sets of attributes.
    • SaveToXML method. Serializes this class within a passed in element.
    Typically, this class is used to construct parameters for, or interpret responses from methods in the UDDIProxy class.

    Element description: Service element: accessor for one or more contacts.

    Author:
    David Melgar (dmelgar@us.ibm.com)
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Contacts()
      Default constructor.
      Contacts​(org.w3c.dom.Element base)
      Construct the object from a DOM tree.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Contact c)
      Add a Contact object to the collection
      Contact get​(int index)
      Retrieve the Contact at the specified index within the collection.
      java.util.Vector getContactVector()
      Get contact.
      boolean remove​(Contact c)
      Remove a Contact object from the collection
      void saveToXML​(org.w3c.dom.Element parent)
      Save an object to the DOM tree.
      void setContactVector​(java.util.Vector s)
      Set contact vector.
      int size()
      Return current size of the collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • base

        protected org.w3c.dom.Element base
    • Constructor Detail

      • Contacts

        public Contacts()
        Default constructor. Avoid using the default constructor for validation. It does not validate required fields. Instead, use the required fields constructor to perform validation.
      • Contacts

        public Contacts​(org.w3c.dom.Element base)
                 throws UDDIException
        Construct the object from a DOM tree. Used by UDDIProxy to construct an object from a received UDDI message.
        Parameters:
        base - Element with the name appropriate for this class.
        Throws:
        UDDIException - Thrown if DOM tree contains a SOAP fault or a disposition report indicating a UDDI error.
    • Method Detail

      • setContactVector

        public void setContactVector​(java.util.Vector s)
        Set contact vector.
        Parameters:
        s - Vector of Contact objects.
      • getContactVector

        public java.util.Vector getContactVector()
        Get contact.
        Returns:
        s Vector of Contact objects.
      • add

        public void add​(Contact c)
        Add a Contact object to the collection
        Parameters:
        c - Contact to be added
      • remove

        public boolean remove​(Contact c)
        Remove a Contact object from the collection
        Parameters:
        c - Contact to be removed
        Returns:
        True if object was removed, false if it was not found in the collection.
      • get

        public Contact get​(int index)
        Retrieve the Contact at the specified index within the collection.
        Parameters:
        index - Index to retrieve from.
        Returns:
        Contact at that index
      • size

        public int size()
        Return current size of the collection.
        Returns:
        Number of Contacts in the collection
      • saveToXML

        public void saveToXML​(org.w3c.dom.Element parent)
        Save an object to the DOM tree. Used to serialize an object to a DOM tree, usually to send a UDDI message.
        Used by UDDIProxy.
        Specified by:
        saveToXML in class UDDIElement
        Parameters:
        parent - Object will serialize as a child element under the passed in parent element.