org.apache.juddi.datatype.business
Class Contact

java.lang.Object
  extended by org.apache.juddi.datatype.business.Contact
All Implemented Interfaces:
java.io.Serializable, RegistryObject

public class Contact
extends java.lang.Object
implements RegistryObject

A businessEntity has a "contacts" attribute which is a collection of these. Holds the "human contact" information.

Author:
Steve Viens (sviens@apache.org)
See Also:
Serialized Form

Constructor Summary
Contact()
          Construct a new initialized Contact instance.
Contact(java.lang.String name)
          Construct a new contact with a given name.
Contact(java.lang.String name, java.lang.String type)
          Construct a new contact with a given UseType and Name.
 
Method Summary
 void addAddress(Address address)
          Add an address to this person.
 void addDescription(Description description)
          Add an description to this contact.
 void addEmail(Email email)
          Add an emailaddress to this person.
 void addPhone(Phone phone)
          Add a phone to this person.
 java.util.Vector getAddressVector()
          Returns the addresses of this person.
 java.util.Vector getDescriptionVector()
          Returns the descriptions of this contact.
 java.util.Vector getEmailVector()
          Returns the email addresses of this person.
 PersonName getPersonName()
          Returns the name of this person.
 java.lang.String getPersonNameValue()
          Returns the name of this person.
 java.util.Vector getPhoneVector()
          Returns the phones of this person.
 java.lang.String getUseType()
          Returns the usetype of this contact.
 void setAddressVector(java.util.Vector adds)
          Set the addresses of this person replacing the old
 void setDescriptionVector(java.util.Vector descriptions)
          Set the descriptions of this contact replacing the old
 void setEmailVector(java.util.Vector emailAddresses)
          Sets a collection of email-addresses to this person replacing the old one
 void setPersonName(PersonName personName)
          Sets the name of this person to the given name.
 void setPersonNameValue(java.lang.String name)
          Sets the name of this person to the given name.
 void setPhoneVector(java.util.Vector phones)
          Set a collection of phone numbers to this person replacing the old.
 void setUseType(java.lang.String type)
          Sets the usetype of this contact to the given usetype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contact

public Contact()
Construct a new initialized Contact instance.


Contact

public Contact(java.lang.String name)
Construct a new contact with a given name. The given name is the name of the person or the name of the persons job role, e.g. "administrator", "webmaster", etc.

Parameters:
name - The name of the contact.

Contact

public Contact(java.lang.String name,
               java.lang.String type)
Construct a new contact with a given UseType and Name. The given name is the name of the person or the name of the persons job role, e.g. "administrator", "webmaster", etc. The UseType is used to describe the contact in freeform text. Examples are: "technical questions", "sales contact", etc.

Parameters:
name - The UseType of the contact.
type - The Name of the contact.
Method Detail

addDescription

public void addDescription(Description description)
Add an description to this contact.

Parameters:
description - The description to add to this contact.

setDescriptionVector

public void setDescriptionVector(java.util.Vector descriptions)
Set the descriptions of this contact replacing the old

Parameters:
descriptions -

getDescriptionVector

public java.util.Vector getDescriptionVector()
Returns the descriptions of this contact.

Returns:
The descriptions of this contact. If this contact has no descriptions, null is returned.

setUseType

public void setUseType(java.lang.String type)
Sets the usetype of this contact to the given usetype. The usetype is used to describe the contact in freeform text. Examples are: "technical questions", "sales contact", etc.

Parameters:
type - The usetype of this contact.

getUseType

public java.lang.String getUseType()
Returns the usetype of this contact. The usetype is used to describe the contact in freeform text. Examples are: "technical questions", "sales contact", etc.

Returns:
The usetype of this contact, or null if this contact doesn't have a usetype.

getPersonNameValue

public java.lang.String getPersonNameValue()
Returns the name of this person. The name can be the name of this person or it can be the role of this person. Examples are "administrator", "webmaster", etc.

Returns:
The name of this person.

getPersonName

public PersonName getPersonName()
Returns the name of this person. The name can be the name of this person or it can be the role of this person. Examples are "administrator", "webmaster", etc.

Returns:
The name of this person as a PersonName.

setPersonNameValue

public void setPersonNameValue(java.lang.String name)
Sets the name of this person to the given name. The name can be the name of the person or it can be the role of this person, e.g. "administrator", "webmaster", etc.

Parameters:
name - The new name of this person.

setPersonName

public void setPersonName(PersonName personName)
Sets the name of this person to the given name. The name can be the name of the person or it can be the role of this person, e.g. "administrator", "webmaster", etc.

Parameters:
personName - The new name of this person.

addAddress

public void addAddress(Address address)
Add an address to this person.

Parameters:
address - The address to add to this person.

setAddressVector

public void setAddressVector(java.util.Vector adds)
Set the addresses of this person replacing the old

Parameters:
adds -

getAddressVector

public java.util.Vector getAddressVector()
Returns the addresses of this person.

Returns:
The addresses of this person. If this person has no addresses, an empty enumeration is returned.

addPhone

public void addPhone(Phone phone)
Add a phone to this person.

Parameters:
phone - The phone to add to this person.

setPhoneVector

public void setPhoneVector(java.util.Vector phones)
Set a collection of phone numbers to this person replacing the old.

Parameters:
phones - The vector of new Phone instances to this person.

getPhoneVector

public java.util.Vector getPhoneVector()
Returns the phones of this person.

Returns:
The phones of this person. If this person doesn't have any phones, an empty enumeration is returned.

addEmail

public void addEmail(Email email)
Add an emailaddress to this person.

Parameters:
email - The email address to add to this person.

setEmailVector

public void setEmailVector(java.util.Vector emailAddresses)
Sets a collection of email-addresses to this person replacing the old one

Parameters:
emailAddresses -

getEmailVector

public java.util.Vector getEmailVector()
Returns the email addresses of this person.

Returns:
The emailaddresses of this person. If this person doesn't have any emailaddresses, an empty enumeration is returned.


Copyright © 2004-2007. All Rights Reserved.