Ruddi™ UDDI Client API
1.0

inspireit.uddi.base
Class Contact

java.lang.Object
  |
  +--inspireit.uddi.base.Contact
All Implemented Interfaces:
java.io.Serializable, inspireit.uddi.util.visitors.UDDIElement

public class Contact
extends java.lang.Object
implements java.io.Serializable, inspireit.uddi.util.visitors.UDDIElement

The Contact class lets record contact information for a person. This information can consist of one or more personal elements, along with a person's name. Contact information exists by containment relationship alone, and no mechanisms for tracking individual contact instances is provided by UDDI specifications.

Author:
Bertrand Fontaine, INSPIRE IT $Revision: 1.2 $
See Also:
Serialized Form

Field Summary
protected  Addresses addresses
          Holds Addresses for the contact (printable lines suitable for addressing an envelope).
protected  Descriptions descriptions
          Optional element.
protected  EMails emails
          Holds E-Mail addresses for the contact.
protected  PersonNames personNames
          Required element.
protected  Phones phones
          Holds telephone numbers for the contact.
protected  UseType useType
          Optional attribute that is used to describe the type of contact in freeform text.
 
Constructor Summary
Contact(PersonNames personNames)
          Contact constructor.
Contact(java.lang.String personName)
          Contact constructor.
 
Method Summary
 void addAddress(Address address)
          Adds an Address.
 void addDescription(Description description)
          Adds a Description of the reason the Contact should be used.
 void addEMail(EMail email)
          Adds an EMail address.
 void addPersonName(PersonName personName)
          Adds a PersonName.
 void addPhone(Phone phone)
          Adds a Phone.
 boolean equals(java.lang.Object o)
          Checks whether an object is equal to this Contact.
 Addresses getAddresses()
          Get all Addresses.
 Descriptions getDescriptions()
          Gets all Descriptions of the reasons the Contact should be used.
 EMails getEMails()
          Get all EMail address.
 PersonNames getPersonNames()
          Gets the names of the persons or names of the job role that will be available behind the contact.
 Phones getPhones()
          Gets all Phone numbers.
 UseType getUseType()
          Gets the optional attribute that is used to describe the type of contact in freeform text.
 void removeAddress(Address address)
          Removes an Address.
 void removeDescription(Description description)
          Removes a Description of the reason the Contact should be used.
 void removeEMail(EMail email)
          Removes an EMail address.
 void removePersonName(PersonName personName)
          Removes a PersonName.
 void removePhone(Phone phone)
          Removes a Phone.
 void setUseType(UseType useType)
          Sets the optional attribute that is used to describe the type of contact in freeform text.
 java.lang.String toString()
          Gets a String representation of the Contact.
 java.lang.Object visit(inspireit.uddi.util.visitors.UDDIVisitor visitor)
          Visits this Contact.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

useType

protected UseType useType
Optional attribute that is used to describe the type of contact in freeform text. Suggested examples include "technical questions", "technical contact", "establish account", "sales contact", etc.


descriptions

protected Descriptions descriptions
Optional element. Zero or more language-qualified descriptions of the reason the contact should be used.


personNames

protected PersonNames personNames
Required element. Contacts should list the name of the person or name of the job role that will be available behind the contact. Examples or roles include "administrator" or "webmaster".


phones

protected Phones phones
Holds telephone numbers for the contact.


emails

protected EMails emails
Holds E-Mail addresses for the contact.


addresses

protected Addresses addresses
Holds Addresses for the contact (printable lines suitable for addressing an envelope).

Constructor Detail

Contact

public Contact(java.lang.String personName)
Contact constructor.

Parameters:
personName - Name of the person or name of the job role that will be available behind the contact. Examples or roles include "administrator" or "webmaster".

Contact

public Contact(PersonNames personNames)
Contact constructor.

Parameters:
personNames - The names of the persons or names of the job roles that will be available behind the contact. Examples or roles include "administrator" or "webmaster".
Since:
UDDI V3.0
Method Detail

addDescription

public void addDescription(Description description)
Adds a Description of the reason the Contact should be used.

Parameters:
description - The Description to add.

removeDescription

public void removeDescription(Description description)
Removes a Description of the reason the Contact should be used.

Parameters:
description - The Description to remove.

getDescriptions

public Descriptions getDescriptions()
Gets all Descriptions of the reasons the Contact should be used.

Returns:
the Descriptions of the reasons the Contact should be used

addPersonName

public void addPersonName(PersonName personName)
Adds a PersonName.

Parameters:
personName - The PersonName to add.
Since:
UDDI V3.0

removePersonName

public void removePersonName(PersonName personName)
Removes a PersonName.

Parameters:
personName - The PersonName to remove.
Since:
UDDI V3.0

getPersonNames

public PersonNames getPersonNames()
Gets the names of the persons or names of the job role that will be available behind the contact. Examples or roles include "administrator" or "webmaster".

Returns:
the names of the persons or names of the job roles that will be available behind the contact

addPhone

public void addPhone(Phone phone)
Adds a Phone.

Parameters:
phone - The Phone to add.

removePhone

public void removePhone(Phone phone)
Removes a Phone.

Parameters:
phone - The Phone to remove.

getPhones

public Phones getPhones()
Gets all Phone numbers.

Returns:
all Phone numbers

addEMail

public void addEMail(EMail email)
Adds an EMail address.

Parameters:
email - The EMail address to add.

removeEMail

public void removeEMail(EMail email)
Removes an EMail address.

Parameters:
email - The EMail address to remove.

getEMails

public EMails getEMails()
Get all EMail address.

Returns:
all EMail addresses

addAddress

public void addAddress(Address address)
Adds an Address.

Parameters:
address - The Address to add.

removeAddress

public void removeAddress(Address address)
Removes an Address.

Parameters:
address - The Address to remove.

getAddresses

public Addresses getAddresses()
Get all Addresses.

Returns:
all Addresses

getUseType

public UseType getUseType()
Gets the optional attribute that is used to describe the type of contact in freeform text. Suggested examples include "technical questions", "technical contact", "establish account", "sales contact", etc.

Returns:
a description of the type of contact in freeform text.

setUseType

public void setUseType(UseType useType)
Sets the optional attribute that is used to describe the type of contact in freeform text. Suggested examples include "technical questions", "technical contact", "establish account", "sales contact", etc.

Parameters:
useType - A description of the type of contact in freeform text.

visit

public java.lang.Object visit(inspireit.uddi.util.visitors.UDDIVisitor visitor)
Visits this Contact.

Specified by:
visit in interface inspireit.uddi.util.visitors.UDDIElement
Parameters:
visitor - The Visitor visiting this Contact.

toString

public java.lang.String toString()
Gets a String representation of the Contact. This corresponds to the value of the first person name.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the Contact

equals

public boolean equals(java.lang.Object o)
Checks whether an object is equal to this Contact. Two Contacts are equal if they have the same value for their personName attribute and at least one Phone OR EMail OR Address in common.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to test for equality.
Returns:
true if o and this Contact are equal; false otherwise

Ruddi™ UDDI Client API
1.0

Download now! | Submit a bug or feature
(c) 2003 INSPIRE IT
Bld Brand Whitlock 109
1200 Brussels, Belgium
All Rights Reserved.