org.jafer.registry.uddi.model
Class Contact

java.lang.Object
  extended by org.jafer.registry.uddi.model.Contact
All Implemented Interfaces:
java.io.Serializable, Contact

public class Contact
extends java.lang.Object
implements Contact

This class represent a contact for a business entity.This Class should never be directly instantiated.

See Also:
Serialized Form

Field Summary
private  java.lang.String description
          Stores a reference to the contacts description
private  java.lang.String email
          Stores a reference to the contacts email
private static java.lang.String EMAIL_USETYPE
          Stores a reference to the use type for email address when not already set
private static int MAX_DESCRIPTION_LENGTH
          Stores a reference to the maximumn number of characters for the description field
private static int MAX_EMAIL_LENGTH
          Stores a reference to the maximumn number of characters for the email field
private static int MAX_NAME_LENGTH
          Stores a reference to the maximumn number of characters for the name field
private static int MAX_PHONE_LENGTH
          Stores a reference to the maximumn number of characters for the phone field
private  java.lang.String name
          Stores a reference to the contacts name
private  java.lang.String phone
          Stores a reference to the contacts phone
private static java.lang.String PHONE_USETYPE
          Stores a reference to the use type for phone numbers when not already set
private  java.lang.String type
          Stores a reference to the contact type.
 
Constructor Summary
Contact(org.uddi4j.datatype.business.Contact uddiContact)
          Creates a Contact object by extracting the details from the UDDI contact object
Contact(java.lang.String name)
          Constructor for the UDDI contact object
Contact(java.lang.String name, java.lang.String desc, java.lang.String phone, java.lang.String email)
          Constructor for the UDDI contact object
 
Method Summary
 java.lang.String getDescription()
          Gets the description of the contact in English
 java.lang.String getEmail()
          Gets the email of the contact
 java.lang.String getName()
          Gets the name of the contact
 java.lang.String getPhone()
          Gets the first phone number of the contact only
 void setDescrition(java.lang.String description)
          Sets the description of the contact in English
 void setEmail(java.lang.String email)
          Sets the email of the contact
 void setName(java.lang.String name)
          Sets the name of the contact
 void setPhone(java.lang.String phone)
          Sets the phone of the contact
 void updateUDDIContact(org.uddi4j.datatype.business.Contact uddiContact)
          Updates the supplied uddi contact object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_PHONE_LENGTH

private static final int MAX_PHONE_LENGTH
Stores a reference to the maximumn number of characters for the phone field

See Also:
Constant Field Values

MAX_NAME_LENGTH

private static final int MAX_NAME_LENGTH
Stores a reference to the maximumn number of characters for the name field

See Also:
Constant Field Values

MAX_DESCRIPTION_LENGTH

private static final int MAX_DESCRIPTION_LENGTH
Stores a reference to the maximumn number of characters for the description field

See Also:
Constant Field Values

MAX_EMAIL_LENGTH

private static final int MAX_EMAIL_LENGTH
Stores a reference to the maximumn number of characters for the email field

See Also:
Constant Field Values

PHONE_USETYPE

private static final java.lang.String PHONE_USETYPE
Stores a reference to the use type for phone numbers when not already set

See Also:
Constant Field Values

EMAIL_USETYPE

private static final java.lang.String EMAIL_USETYPE
Stores a reference to the use type for email address when not already set

See Also:
Constant Field Values

type

private java.lang.String type
Stores a reference to the contact type. Set to Main Contact if not currently set.


name

private java.lang.String name
Stores a reference to the contacts name


description

private java.lang.String description
Stores a reference to the contacts description


email

private java.lang.String email
Stores a reference to the contacts email


phone

private java.lang.String phone
Stores a reference to the contacts phone

Constructor Detail

Contact

public Contact(java.lang.String name)
        throws InvalidNameException,
               InvalidLengthException
Constructor for the UDDI contact object

Parameters:
name - The contacts name
Throws:
InvalidNameException
InvalidLengthException

Contact

public Contact(java.lang.String name,
               java.lang.String desc,
               java.lang.String phone,
               java.lang.String email)
        throws InvalidNameException,
               InvalidLengthException
Constructor for the UDDI contact object

Parameters:
name - The contacts name
desc - The contacts description
phone - The contacts phone number
email - The contacts email
Throws:
InvalidNameException
InvalidLengthException

Contact

public Contact(org.uddi4j.datatype.business.Contact uddiContact)
Creates a Contact object by extracting the details from the UDDI contact object

Parameters:
uddiContact - The uddi contact object to extract from
Method Detail

updateUDDIContact

public void updateUDDIContact(org.uddi4j.datatype.business.Contact uddiContact)
Updates the supplied uddi contact object

Parameters:
uddiContact - The object to update

getName

public java.lang.String getName()
Gets the name of the contact

Specified by:
getName in interface Contact
Returns:
The contacts name

setName

public void setName(java.lang.String name)
             throws InvalidNameException,
                    InvalidLengthException
Sets the name of the contact

Specified by:
setName in interface Contact
Parameters:
name - The name to set
Throws:
InvalidNameException
InvalidLengthException

getDescription

public java.lang.String getDescription()
Gets the description of the contact in English

Specified by:
getDescription in interface Contact
Returns:
The contacts name

setDescrition

public void setDescrition(java.lang.String description)
                   throws InvalidLengthException
Sets the description of the contact in English

Specified by:
setDescrition in interface Contact
Parameters:
description - The description to set
Throws:
InvalidLengthException

getPhone

public java.lang.String getPhone()
Gets the first phone number of the contact only

Specified by:
getPhone in interface Contact
Returns:
The contacts name

setPhone

public void setPhone(java.lang.String phone)
              throws InvalidLengthException
Sets the phone of the contact

Specified by:
setPhone in interface Contact
Parameters:
phone - The phone to set
Throws:
InvalidLengthException

getEmail

public java.lang.String getEmail()
Gets the email of the contact

Specified by:
getEmail in interface Contact
Returns:
The contacts name

setEmail

public void setEmail(java.lang.String email)
              throws InvalidLengthException
Sets the email of the contact

Specified by:
setEmail in interface Contact
Parameters:
email - The email to set
Throws:
InvalidLengthException