Compoze Software, Inc.

com.compoze.contact
Class Contact

java.lang.Object
  |
  +--com.compoze.contact.Contact
All Implemented Interfaces:
java.io.Serializable

public class Contact
extends java.lang.Object
implements java.io.Serializable

This class represents a contact.

To add and search for contacts, see the Contacts collection class. Once the contact is obtained, its accessor methods may be called to set and get properties. The update() method must be called to store any changes to the server.

Contact conforms to the vCard specification (RFC #2426). To generate a vCard compliant representation of a contact, user toVcardString().

The following table contains the mappings from Contact properties to their corresponding Java methods:

Contact Property Java Methods
ContactProperty.ANNIVERSARY getAnniversary()
ContactProperty.ASSISTANT_NAME getAssistantName()
ContactProperty.AUTHOR getAuthor()
ContactProperty.BIRTHDAY getBirthday()
ContactProperty.COMPANY_NAME getCompanyName()
ContactProperty.CATEGORY getCategory()
ContactProperty.DATE_CREATED getDateCreated()
ContactProperty.DATE_LAST_MODIFIED getDateLastModified()
ContactProperty.DEPARTMENT_NAME getDepartmentName()
ContactProperty.FIRST_NAME getFirstName()
ContactProperty.MIDDLE_NAME getMiddleName()
ContactProperty.LAST_NAME getLastName()
ContactProperty.NAME_PREFIX getNamePrefix()
ContactProperty.NAME_SUFFIX getNameSuffix()
ContactProperty.NICKNAME getNickname()
ContactProperty.MANAGER_NAME getManagerName()
ContactProperty.OFFICE_LOCATION getOfficeLocation()
ContactProperty.TITLE getTitle()
ContactProperty.SPOUSE_NAME getSpouseName()
ContactProperty.WEB_PAGE getWebPage()
ContactProperty.FTP_SITE getFtpSite()
ContactProperty.FLAG getFlag()
ContactProperty.CAR_TELEPHONE_NUMBER getCarTelephoneNumber()
ContactProperty.MOBILE_TELEPHONE_NUMBER getMobileTelephoneNumber()
ContactProperty.PAGER_TELEPHONE_NUMBER getPagerTelephoneNumber()
ContactProperty.OTHER_TELEPHONE_NUMBER getOtherTelephoneNumber()
ContactProperty.BUSINESS_TELEPHONE_NUMBER getBusinessTelephoneNumber()
ContactProperty.ASSISTANT_TELEPHONE_NUMBER getAssistantTelephoneNumber()
ContactProperty.HOME_TELEPHONE_NUMBER getHomeTelephoneNumber()
ContactProperty.HOME_FAX_NUMBER getHomeFaxNumber()
ContactProperty.BUSINESS_FAX_NUMBER getBusinessFaxNumber()
ContactProperty.EMAIL_ADDRESS getEmailAddress()
ContactProperty.EMAIL2_ADDRESS getEmail2Address()
ContactProperty.EMAIL3_ADDRESS getEmail3Address()
ContactProperty.HOME_ADDRESS_POST_OFFICE_BOX getHomeAddressPostOfficeBox()
ContactProperty.HOME_ADDRESS_STREET getHomeAddressStreet()
ContactProperty.HOME_ADDRESS_CITY getHomeAddressCity()
ContactProperty.HOME_ADDRESS_STATE_OR_PROVINCE getHomeAddressStateOrProvince()
ContactProperty.HOME_ADDRESS_POSTAL_CODE getHomeAddressPostalCode()
ContactProperty.HOME_ADDRESS_COUNTRY getHomeAddressCountry()
ContactProperty.BUSINESS_ADDRESS_POST_OFFICE_BOX getBusinessAddressPostOfficeBox()
ContactProperty.BUSINESS_ADDRESS_STREET getBusinessAddressStreet()
ContactProperty.BUSINESS_ADDRESS_CITY getBusinessAddressCity()
ContactProperty.BUSINESS_ADDRESS_STATE_OR_PROVINCE getBusinessAddressStateOrProvince()
ContactProperty.BUSINESS_ADDRESS_POSTAL_CODE getBusinessAddressPostalCode()
ContactProperty.BUSINESS_ADDRESS_COUNTRY getBusinessAddressCountry()
ContactProperty.OTHER_ADDRESS_POST_OFFICE_BOX getOtherAddressPostOfficeBox()
ContactProperty.OTHER_ADDRESS_STREET getOtherAddressStreet()
ContactProperty.OTHER_ADDRESS_CITY getOtherAddressCity()
ContactProperty.OTHER_ADDRESS_STATE_OR_PROVINCE getOtherAddressStateOrProvince()
ContactProperty.OTHER_ADDRESS_POSTAL_CODE getOtherAddressPostalCode()
ContactProperty.OTHER_ADDRESS_COUNTRY getOtherAddressCountry()
ContactProperty.PICTURE_IMAGE getPictureImage()
ContactProperty.CUSTOM_NUM1 getCustomNum1()
ContactProperty.CUSTOM_NUM2 getCustomNum2()
ContactProperty.CUSTOM_NUM3 getCustomNum3()
ContactProperty.CUSTOM_STR1 getCustomStr1()
ContactProperty.CUSTOM_STR2 getCustomStr2()
ContactProperty.CUSTOM_STR3 getCustomStr3()
ContactProperty.CUSTOM_STR4 getCustomStr4()

See Also:
Serialized Form

Constructor Summary
Contact()
          Constructor.
 
Method Summary
 void clearFlag()
          Clears the flag on this contact.
 void delete()
          Updates the contact (saves the contact entry).
 void delete(boolean bArchive)
          Deletes the contact.
 boolean equals(java.lang.Object obj)
          Checks if the specified object is "equal to" this one.
 void flag(Flag flag)
          Flags this contact with the specified flag.
 AccessManager getAccessManager()
          Gets the access manager for this contact.
 java.lang.String getAddressCity()
          Gets the city of the contact which is the mailing address.
 java.lang.String getAddressCountry()
          Gets the country of the contact which is the mailing address.
 java.lang.String getAddressPostalCode()
          Gets the postal code of the contact which is the mailing address.
 java.lang.String getAddressPostOfficeBox()
          Gets the post office box of the contact which is the mailing address.
 java.lang.String getAddressStateOrProvince()
          Gets the state or province of the contact which is the mailing address.
 java.lang.String getAddressStreet()
          Gets the street address of the contact which is the mailing address.
 java.util.Date getAnniversary()
          Gets the anniversary for the contact.
 java.lang.String getAssistantName()
          Gets the assistant's name of the contact.
 java.lang.String getAssistantTelephoneNumber()
          Gets the assistant telephone number of the contact.
 java.lang.String getAuthor()
          Gets the name of the author.
 java.util.Date getBirthday()
          Gets the birthday for the contact.
 java.lang.String getBusinessAddressCity()
          Gets the business address city of the contact.
 java.lang.String getBusinessAddressCountry()
          Gets the business address country of the contact.
 java.lang.String getBusinessAddressPostalCode()
          Gets the business address postal code of the contact.
 java.lang.String getBusinessAddressPostOfficeBox()
          Gets the business address post office box of the contact.
 java.lang.String getBusinessAddressStateOrProvince()
          Gets the business address state or province of the contact.
 java.lang.String getBusinessAddressStreet()
          Gets the business address street of the contact.
 java.lang.String getBusinessFaxNumber()
          Gets the business fax number of the contact.
 java.lang.String getBusinessTelephoneNumber()
          Gets the business telephone number of the contact.
 java.lang.String getCarTelephoneNumber()
          Gets the car telephone number of the contact.
 Category getCategory()
          Gets the category of the contact.
 java.lang.String getCompanyName()
          Gets the company name of the contact.
 long getCustomNum1()
          Gets the custom number1 field of the contact.
 long getCustomNum2()
          Gets the custom number2 field of the contact.
 long getCustomNum3()
          Gets the custom number3 field of the contact.
 java.lang.String getCustomStr1()
          Gets the custom string1 field of the contact.
 java.lang.String getCustomStr2()
          Gets the custom string2 field of the contact.
 java.lang.String getCustomStr3()
          Gets the custom string3 field of the contact.
 java.lang.String getCustomStr4()
          Gets the custom string4 field of the contact.
 java.util.Date getDateCreated()
          Gets the date the contact was created.
 java.util.Date getDateLastModified()
          Gets the date the contact was last modified.
 java.lang.String getDepartmentName()
          Gets the department name of the contact.
 java.lang.String getEmail2Address()
          Gets the email2 address of the contact.
 java.lang.String getEmail3Address()
          Gets the email3 address of the contact.
 java.lang.String getEmailAddress()
          Gets the email address of the contact.
 java.lang.String getFirstName()
           
 Flag getFlag()
          Gets the flag of the contact.
 java.lang.String getFtpSite()
          Gets the ftp site of the contact.
 java.lang.String getGivenName()
          Gets the given name for a contact.
 java.lang.String getHomeAddressCity()
          Gets the home address city of the contact.
 java.lang.String getHomeAddressCountry()
          Gets the home address country of the contact.
 java.lang.String getHomeAddressPostalCode()
          Gets the home address postal code of the contact.
 java.lang.String getHomeAddressPostOfficeBox()
          Gets the home address post office box of the contact.
 java.lang.String getHomeAddressStateOrProvince()
          Gets the home address state or province of the contact.
 java.lang.String getHomeAddressStreet()
          Gets the home address street of the contact.
 java.lang.String getHomeFaxNumber()
          Gets the home fax number of the contact.
 java.lang.String getHomeTelephoneNumber()
          Gets the home telephone number of the contact.
 long getID()
          Gets the unique identifier (id) of the contact.
 java.lang.String getLastName()
          Gets the last name of the contact.
 MailingAddress getMailingAddress()
          Gets the mailing address of the contact.
 java.lang.String getManagerName()
          Gets the manager's name of the contact.
 java.lang.String getMiddleName()
          Gets the middle name of the contact.
 java.lang.String getMobileTelephoneNumber()
          Gets the mobile telephone number of the contact.
 java.lang.String getNamePrefix()
          Gets the name prefix of the contact.
 java.lang.String getNameSuffix()
          Gets the name suffix of the contact.
 java.lang.String getNickname()
          Gets the nickname of the contact.
 java.lang.String getOfficeLocation()
          Gets the office location of the contact.
 java.lang.String getOtherAddressCity()
          Gets the other address city of the contact.
 java.lang.String getOtherAddressCountry()
          Gets the other address country of the contact.
 java.lang.String getOtherAddressPostalCode()
          Gets the other address postal code of the contact.
 java.lang.String getOtherAddressPostOfficeBox()
          Gets the other address post office box of the contact.
 java.lang.String getOtherAddressStateOrProvince()
          Gets the other address state or province of the contact.
 java.lang.String getOtherAddressStreet()
          Gets the other address street of the contact.
 java.lang.String getOtherTelephoneNumber()
          Gets the other telephone number of the contact.
 java.lang.String getPagerTelephoneNumber()
          Gets the pager telephone number of the contact.
 BinaryData getPictureImage()
          Gets the picture image for the contact.
 PrimaryTelephoneNumber getPrimaryTelephoneNumber()
          Gets the setting for the primary telephone number.
 java.lang.String getSpouseName()
          Gets the spouse's name of the contact.
 java.lang.String getTelephoneNumber()
          Gets the telephone number of the contact which is the primary telephone number.
 java.lang.String getTitle()
          Gets the title of the contact.
 java.lang.String getWebPage()
          Gets the web page of the contact.
 void setAnniversary(java.util.Date anniversary)
          Sets the anniversary for the contact.
 void setAssistantName(java.lang.String sAssistantName)
          Sets the assistant's name of the contact.
 void setAssistantTelephoneNumber(java.lang.String sNumber)
          Sets the assistant telephone number of the contact.
 void setBirthday(java.util.Date birthday)
          Sets the birthday for the contact.
 void setBusinessAddressCity(java.lang.String sCity)
          Sets the business address city of the contact.
 void setBusinessAddressCountry(java.lang.String sCountry)
          Sets the business address country of the contact.
 void setBusinessAddressPostalCode(java.lang.String sPostalCode)
          Sets the business address postal code of the contact.
 void setBusinessAddressPostOfficeBox(java.lang.String sPostOfficeBox)
          Sets the business address post office box of the contact.
 void setBusinessAddressStateOrProvince(java.lang.String sStateOrProvince)
          Sets the business address state or province of the contact.
 void setBusinessAddressStreet(java.lang.String sStreet)
          Sets the business address street of the contact.
 void setBusinessFaxNumber(java.lang.String sNumber)
          Sets the business fax number of the contact.
 void setBusinessTelephoneNumber(java.lang.String sNumber)
          Sets the business telephone number of the contact.
 void setCarTelephoneNumber(java.lang.String sNumber)
          Sets the car telephone number of the contact.
 void setCategory(Category category)
          Sets the category of the contact.
 void setCompanyName(java.lang.String sCompanyName)
          Sets the company name of the contact.
 void setCustomNum1(long lCustomNum1)
          Sets the custom number1 field of the contact.
 void setCustomNum2(long lCustomNum2)
          Sets the custom number2 field of the contact.
 void setCustomNum3(long lCustomNum3)
          Sets the custom number3 field of the contact.
 void setCustomStr1(java.lang.String sCustomStr1)
          Sets the custom string1 field of the contact.
 void setCustomStr2(java.lang.String sCustomStr2)
          Sets the custom string2 field of the contact.
 void setCustomStr3(java.lang.String sCustomStr3)
          Sets the custom string3 field of the contact.
 void setCustomStr4(java.lang.String sCustomStr4)
          Sets the custom string4 field of the contact.
 void setDepartmentName(java.lang.String sDepartmentName)
          Sets the department name of the contact.
 void setEmail2Address(java.lang.String sAddress)
          Sets the email2 address of the contact.
 void setEmail3Address(java.lang.String sAddress)
          Sets the email3 address of the contact.
 void setEmailAddress(java.lang.String sAddress)
          Sets the email address of the contact.
 void setFirstName(java.lang.String sFirstName)
          Sets the first name of the contact.
 void setFtpSite(java.lang.String sFtpSite)
          Sets the ftp site of the contact.
 void setHomeAddressCity(java.lang.String sCity)
          Sets the home address city of the contact.
 void setHomeAddressCountry(java.lang.String sCountry)
          Sets the home address country of the contact.
 void setHomeAddressPostalCode(java.lang.String sPostalCode)
          Sets the home address postal code of the contact.
 void setHomeAddressPostOfficeBox(java.lang.String sPostOfficeBox)
          Sets the home address post office box of the contact.
 void setHomeAddressStateOrProvince(java.lang.String sStateOrProvince)
          Sets the home address state or province of the contact.
 void setHomeAddressStreet(java.lang.String sStreet)
          Sets the home address street of the contact.
 void setHomeFaxNumber(java.lang.String sNumber)
          Sets the home fax number of the contact.
 void setHomeTelephoneNumber(java.lang.String sNumber)
          Sets the home telephone number of the contact.
 void setLastName(java.lang.String sLastName)
          Sets the last name of the contact.
 void setMailingAddress(MailingAddress address)
          Sets the mailing address of the contact.
 void setManagerName(java.lang.String sManagerName)
          Sets the manager's name of the contact.
 void setMiddleName(java.lang.String sMiddleName)
          Sets the middle name of the contact.
 void setMobileTelephoneNumber(java.lang.String sNumber)
          Sets the mobile telephone number of the contact.
 void setNamePrefix(java.lang.String sNamePrefix)
          Sets the name prefix of the contact.
 void setNameSuffix(java.lang.String sNameSuffix)
          Sets the name suffix of the contact.
 void setNickname(java.lang.String sNickname)
          Sets the nickname of the contact.
 void setOfficeLocation(java.lang.String sOfficeLocation)
          Sets the office location of the contact.
 void setOtherAddressCity(java.lang.String sCity)
          Sets the other address city of the contact.
 void setOtherAddressCountry(java.lang.String sCountry)
          Sets the other address country of the contact.
 void setOtherAddressPostalCode(java.lang.String sPostalCode)
          Sets the other address postal code of the contact.
 void setOtherAddressPostOfficeBox(java.lang.String sPostOfficeBox)
          Sets the other address post office box of the contact.
 void setOtherAddressStateOrProvince(java.lang.String sStateOrProvince)
          Sets the other address state or province of the contact.
 void setOtherAddressStreet(java.lang.String sStreet)
          Sets the other address street of the contact.
 void setOtherTelephoneNumber(java.lang.String sNumber)
          Sets the other telephone number of the contact.
 void setPagerTelephoneNumber(java.lang.String sNumber)
          Sets the pager telephone number of the contact.
 void setPictureImage(BinaryData image)
          Sets the picture image for the contact.
 void setPrimaryTelephoneNumber(PrimaryTelephoneNumber primary)
          Sets the primary telephone number.
 void setSpouseName(java.lang.String sSpouseName)
          Sets the spouse's name of the contact.
 void setTitle(java.lang.String sTitle)
          Sets the title of the contact.
 void setWebPage(java.lang.String sWebPage)
          Sets the web page of the contact.
 java.lang.String toString()
          Returns a string representation of the object.
 java.lang.String toVcardString()
          Creates a string that contains the vCard compliant (RFC #2426) representation of the contact.
 boolean update()
          Updates the contact (saves the contact entry).
 boolean update(boolean bForce)
          Updates the contact (saves the contact entry).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Contact

public Contact()
Constructor.
Method Detail

getID

public long getID()
Gets the unique identifier (id) of the contact. This is non-zero number that uniquely identifies the contact.
Returns:
the id of the contact

getFirstName

public java.lang.String getFirstName()

setFirstName

public void setFirstName(java.lang.String sFirstName)
Sets the first name of the contact.
Parameters:
sFirstName - the first name of the contact or null if no first name is set

getCompanyName

public java.lang.String getCompanyName()
Gets the company name of the contact.
Returns:
the company name of the contact or null if no company name is set

setCompanyName

public void setCompanyName(java.lang.String sCompanyName)
Sets the company name of the contact.
Parameters:
sCompanyName - the company name of the contact or null if no company name is set

getCategory

public Category getCategory()
Gets the category of the contact.
Returns:
the category of the contact or null if no category is set

setCategory

public void setCategory(Category category)
Sets the category of the contact.
Parameters:
category - the category of the contact or null for no category

getDepartmentName

public java.lang.String getDepartmentName()
Gets the department name of the contact.
Returns:
the department name of the contact or null if no department name is set

setDepartmentName

public void setDepartmentName(java.lang.String sDepartmentName)
Sets the department name of the contact.
Parameters:
sDepartmentName - the department name of the contact or null if no department name is set

getManagerName

public java.lang.String getManagerName()
Gets the manager's name of the contact.
Returns:
the manager's name of the contact or null if no manager's name is set

setManagerName

public void setManagerName(java.lang.String sManagerName)
Sets the manager's name of the contact.
Parameters:
sManagerName - the manager's name of the contact or null if no manager's name is set

getAssistantName

public java.lang.String getAssistantName()
Gets the assistant's name of the contact.
Returns:
the assistant's name of the contact or null if no assistant's name is set

setAssistantName

public void setAssistantName(java.lang.String sAssistantName)
Sets the assistant's name of the contact.
Parameters:
sAssistantName - the assistant's name of the contact or null if no assistant's name is set

getOfficeLocation

public java.lang.String getOfficeLocation()
Gets the office location of the contact.
Returns:
the office location of the contact or null if no office location is set

setOfficeLocation

public void setOfficeLocation(java.lang.String sOfficeLocation)
Sets the office location of the contact.
Parameters:
sOfficeLocation - the office location of the contact or null if no office location is set

getTitle

public java.lang.String getTitle()
Gets the title of the contact.
Returns:
the title of the contact or null if no title is set

setTitle

public void setTitle(java.lang.String sTitle)
Sets the title of the contact.
Parameters:
sTitle - the title of the contact or null if no title is set

getBirthday

public java.util.Date getBirthday()
Gets the birthday for the contact.
Returns:
the birthday for the contact or null if no birthday is set

setBirthday

public void setBirthday(java.util.Date birthday)
Sets the birthday for the contact.
Parameters:
birthday - the birthday for the contact or null if no birthday is set

getAnniversary

public java.util.Date getAnniversary()
Gets the anniversary for the contact.
Returns:
the anniversary of the contact or null if no anniversary is set

setAnniversary

public void setAnniversary(java.util.Date anniversary)
Sets the anniversary for the contact.
Parameters:
anniversary - the anniversary for the contact or null if no anniversary is set

getSpouseName

public java.lang.String getSpouseName()
Gets the spouse's name of the contact.
Returns:
the spouse's name of the contact or null if no spouse's name is set

setSpouseName

public void setSpouseName(java.lang.String sSpouseName)
Sets the spouse's name of the contact.
Parameters:
sSpouseName - the anniversary of the contact or null if no anniversary is set

getWebPage

public java.lang.String getWebPage()
Gets the web page of the contact.
Returns:
the web page of the contact or null if no web page is set

setWebPage

public void setWebPage(java.lang.String sWebPage)
Sets the web page of the contact.
Parameters:
sWebPage - the web page of the contact or null if no web page is set

getFtpSite

public java.lang.String getFtpSite()
Gets the ftp site of the contact.
Returns:
the ftp site of the contact or null if no ftp site is set

setFtpSite

public void setFtpSite(java.lang.String sFtpSite)
Sets the ftp site of the contact.
Parameters:
sFtpSite - the ftp site of the contact or null if no ftp site is set

getFlag

public Flag getFlag()
Gets the flag of the contact.
Returns:
the flag of the contact or null for none

flag

public void flag(Flag flag)
Flags this contact with the specified flag.
Parameters:
flag - the flag

clearFlag

public void clearFlag()
Clears the flag on this contact.

getCarTelephoneNumber

public java.lang.String getCarTelephoneNumber()
Gets the car telephone number of the contact.
Returns:
the car telephone number of the contact or null if no car telephone number is set

setCarTelephoneNumber

public void setCarTelephoneNumber(java.lang.String sNumber)
Sets the car telephone number of the contact.
Parameters:
sNumber - the car telephone number of the contact or null for no car telephone number

getMobileTelephoneNumber

public java.lang.String getMobileTelephoneNumber()
Gets the mobile telephone number of the contact.
Returns:
the mobile telephone number of the contact or null if no mobile telephone number is set

setMobileTelephoneNumber

public void setMobileTelephoneNumber(java.lang.String sNumber)
Sets the mobile telephone number of the contact.
Parameters:
sNumber - the mobile telephone number of the contact or null for no mobile telephone number

getPagerTelephoneNumber

public java.lang.String getPagerTelephoneNumber()
Gets the pager telephone number of the contact.
Returns:
the pager telephone number of the contact or null if no pager telephone number is set

setPagerTelephoneNumber

public void setPagerTelephoneNumber(java.lang.String sNumber)
Sets the pager telephone number of the contact.
Parameters:
sNumber - the pager telephone number of the contact or null for no pager telephone number

getOtherTelephoneNumber

public java.lang.String getOtherTelephoneNumber()
Gets the other telephone number of the contact.
Returns:
the other telephone number of the contact or null if no other telephone number is set

setOtherTelephoneNumber

public void setOtherTelephoneNumber(java.lang.String sNumber)
Sets the other telephone number of the contact.
Parameters:
sNumber - the other telephone number of the contact or null for no other telephone number

getBusinessTelephoneNumber

public java.lang.String getBusinessTelephoneNumber()
Gets the business telephone number of the contact.
Returns:
the business telephone number of the contact or null if no business telephone number is set

setBusinessTelephoneNumber

public void setBusinessTelephoneNumber(java.lang.String sNumber)
Sets the business telephone number of the contact.
Parameters:
sNumber - the business telephone number of the contact or null for no business telephone number

getAssistantTelephoneNumber

public java.lang.String getAssistantTelephoneNumber()
Gets the assistant telephone number of the contact.
Returns:
the assistant telephone number of the contact or null if no assistant telephone number is set

setAssistantTelephoneNumber

public void setAssistantTelephoneNumber(java.lang.String sNumber)
Sets the assistant telephone number of the contact.
Parameters:
sNumber - the assistant telephone number of the contact or null for no assistant telephone number

getHomeTelephoneNumber

public java.lang.String getHomeTelephoneNumber()
Gets the home telephone number of the contact.
Returns:
the home telephone number of the contact or null if no home telephone number is set

setHomeTelephoneNumber

public void setHomeTelephoneNumber(java.lang.String sNumber)
Sets the home telephone number of the contact.
Parameters:
sNumber - the home telephone number of the contact or null for no home telephone number

getHomeFaxNumber

public java.lang.String getHomeFaxNumber()
Gets the home fax number of the contact.
Returns:
the home fax number of the contact or null if no home fax number is set

setHomeFaxNumber

public void setHomeFaxNumber(java.lang.String sNumber)
Sets the home fax number of the contact.
Parameters:
sNumber - the home fax number of the contact or null for no home fax number

getBusinessFaxNumber

public java.lang.String getBusinessFaxNumber()
Gets the business fax number of the contact.
Returns:
the business fax number of the contact or null if no business fax number is set

setBusinessFaxNumber

public void setBusinessFaxNumber(java.lang.String sNumber)
Sets the business fax number of the contact.
Parameters:
sNumber - the business fax number of the contact or null for no business fax number

getEmailAddress

public java.lang.String getEmailAddress()
Gets the email address of the contact.
Returns:
the email address of the contact or null if no email addressis set

setEmailAddress

public void setEmailAddress(java.lang.String sAddress)
Sets the email address of the contact.
Parameters:
sAddress - the email address of the contact or null for no email address

getEmail2Address

public java.lang.String getEmail2Address()
Gets the email2 address of the contact.
Returns:
the email2 address of the contact or null if no email2 addressis set

setEmail2Address

public void setEmail2Address(java.lang.String sAddress)
Sets the email2 address of the contact.
Parameters:
sAddress - the email2 address of the contact or null for no email2 address

getEmail3Address

public java.lang.String getEmail3Address()
Gets the email3 address of the contact.
Returns:
the email3 address of the contact or null if no email3 addressis set

setEmail3Address

public void setEmail3Address(java.lang.String sAddress)
Sets the email3 address of the contact.
Parameters:
sAddress - the email3 address of the contact or null for no email3 address

getHomeAddressPostOfficeBox

public java.lang.String getHomeAddressPostOfficeBox()
Gets the home address post office box of the contact.
Returns:
the home address post office box of the contact or null if no home address post office box set

setHomeAddressPostOfficeBox

public void setHomeAddressPostOfficeBox(java.lang.String sPostOfficeBox)
Sets the home address post office box of the contact.
Parameters:
sPostOfficeBox - the home address post office box of the contact or null for no home address post office box

getHomeAddressStreet

public java.lang.String getHomeAddressStreet()
Gets the home address street of the contact.
Returns:
the home address street of the contact or null if no home address street set

setHomeAddressStreet

public void setHomeAddressStreet(java.lang.String sStreet)
Sets the home address street of the contact.
Parameters:
sStreet - the home address street of the contact or null for no home address street

getHomeAddressCity

public java.lang.String getHomeAddressCity()
Gets the home address city of the contact.
Returns:
the home address city of the contact or null if no home address city set

setHomeAddressCity

public void setHomeAddressCity(java.lang.String sCity)
Sets the home address city of the contact.
Parameters:
sCity - the home address city of the contact or null for no home address city

getHomeAddressStateOrProvince

public java.lang.String getHomeAddressStateOrProvince()
Gets the home address state or province of the contact.
Returns:
the home address state or province of the contact or null if no home address state or province set

setHomeAddressStateOrProvince

public void setHomeAddressStateOrProvince(java.lang.String sStateOrProvince)
Sets the home address state or province of the contact.
Parameters:
sStateOrProvince - the home address state or province of the contact or null for no home address state or province

getHomeAddressPostalCode

public java.lang.String getHomeAddressPostalCode()
Gets the home address postal code of the contact.
Returns:
the home address postal code of the contact or null if no home address postal code set

setHomeAddressPostalCode

public void setHomeAddressPostalCode(java.lang.String sPostalCode)
Sets the home address postal code of the contact.
Parameters:
sPostalCode - the home address postal code of the contact or null for no home address postal code

getHomeAddressCountry

public java.lang.String getHomeAddressCountry()
Gets the home address country of the contact.
Returns:
the home address country of the contact or null if no home address country set

setHomeAddressCountry

public void setHomeAddressCountry(java.lang.String sCountry)
Sets the home address country of the contact.
Parameters:
sAddress - the home address country of the contact or null for no home address country

getBusinessAddressPostOfficeBox

public java.lang.String getBusinessAddressPostOfficeBox()
Gets the business address post office box of the contact.
Returns:
the business address post office box of the contact or null if no business address post office box set

setBusinessAddressPostOfficeBox

public void setBusinessAddressPostOfficeBox(java.lang.String sPostOfficeBox)
Sets the business address post office box of the contact.
Parameters:
sPostOfficeBox - the business address post office box of the contact or null for no business address post office box

getBusinessAddressStreet

public java.lang.String getBusinessAddressStreet()
Gets the business address street of the contact.
Returns:
the business address street of the contact or null if no business address street set

setBusinessAddressStreet

public void setBusinessAddressStreet(java.lang.String sStreet)
Sets the business address street of the contact.
Parameters:
sStreet - the business address street of the contact or null for no business address street

getBusinessAddressCity

public java.lang.String getBusinessAddressCity()
Gets the business address city of the contact.
Returns:
the business address city of the contact or null if no business address city set

setBusinessAddressCity

public void setBusinessAddressCity(java.lang.String sCity)
Sets the business address city of the contact.
Parameters:
sCity - the business address city of the contact or null for no business address city

getBusinessAddressStateOrProvince

public java.lang.String getBusinessAddressStateOrProvince()
Gets the business address state or province of the contact.
Returns:
the business address state or province of the contact or null if no business address state or province set

setBusinessAddressStateOrProvince

public void setBusinessAddressStateOrProvince(java.lang.String sStateOrProvince)
Sets the business address state or province of the contact.
Parameters:
sStateOrProvince - the business address state or province of the contact or null for no business address state or province

getBusinessAddressPostalCode

public java.lang.String getBusinessAddressPostalCode()
Gets the business address postal code of the contact.
Returns:
the business address postal code of the contact or null if no business address postal code set

setBusinessAddressPostalCode

public void setBusinessAddressPostalCode(java.lang.String sPostalCode)
Sets the business address postal code of the contact.
Parameters:
sPostalCode - the business address postal code of the contact or null for no business address postal code

getBusinessAddressCountry

public java.lang.String getBusinessAddressCountry()
Gets the business address country of the contact.
Returns:
the business address country of the contact or null if no business address country set

setBusinessAddressCountry

public void setBusinessAddressCountry(java.lang.String sCountry)
Sets the business address country of the contact.
Parameters:
sCountry - the business address country of the contact or null for no business address country

getOtherAddressPostOfficeBox

public java.lang.String getOtherAddressPostOfficeBox()
Gets the other address post office box of the contact.
Returns:
the other address post office box of the contact or null if no other address post office box set

setOtherAddressPostOfficeBox

public void setOtherAddressPostOfficeBox(java.lang.String sPostOfficeBox)
Sets the other address post office box of the contact.
Parameters:
sPostOfficeBox - the other address post office box of the contact or null for no other address post office box

getOtherAddressStreet

public java.lang.String getOtherAddressStreet()
Gets the other address street of the contact.
Returns:
the other address street of the contact or null if no other address street set

setOtherAddressStreet

public void setOtherAddressStreet(java.lang.String sStreet)
Sets the other address street of the contact.
Parameters:
sStreet - the other address street of the contact or null for no other address street

getOtherAddressCity

public java.lang.String getOtherAddressCity()
Gets the other address city of the contact.
Returns:
the other address city of the contact or null if no other address city set

setOtherAddressCity

public void setOtherAddressCity(java.lang.String sCity)
Sets the other address city of the contact.
Parameters:
sCity - the other address city of the contact or null for no other address city

getOtherAddressStateOrProvince

public java.lang.String getOtherAddressStateOrProvince()
Gets the other address state or province of the contact.
Returns:
the other address state or province of the contact or null if no other address state or province set

setOtherAddressStateOrProvince

public void setOtherAddressStateOrProvince(java.lang.String sStateOrProvince)
Sets the other address state or province of the contact.
Parameters:
sStateOrProvince - the other address state or province of the contact or null for no other address state or province

getOtherAddressPostalCode

public java.lang.String getOtherAddressPostalCode()
Gets the other address postal code of the contact.
Returns:
the other address postal code of the contact or null if no other address postal code set

setOtherAddressPostalCode

public void setOtherAddressPostalCode(java.lang.String sPostalCode)
Sets the other address postal code of the contact.
Parameters:
sPostalCode - the other address postal code of the contact or null for no other address postal code

getOtherAddressCountry

public java.lang.String getOtherAddressCountry()
Gets the other address country of the contact.
Returns:
the other address country of the contact or null if no other address country set

setOtherAddressCountry

public void setOtherAddressCountry(java.lang.String sCountry)
Sets the other address country of the contact.
Parameters:
sCountry - the other address country of the contact or null for no other address country

getMiddleName

public java.lang.String getMiddleName()
Gets the middle name of the contact.
Returns:
the middle name of the contact or null if no middle name is set

setMiddleName

public void setMiddleName(java.lang.String sMiddleName)
Sets the middle name of the contact.
Parameters:
sMiddleName - the middle name of the contact or null if no middle name is set

getLastName

public java.lang.String getLastName()
Gets the last name of the contact.
Returns:
the last name of the contact or null if no last name is set

setLastName

public void setLastName(java.lang.String sLastName)
Sets the last name of the contact.
Parameters:
sLastName - the last name of the contact or null if no last name is set

getNickname

public java.lang.String getNickname()
Gets the nickname of the contact.
Returns:
the nickname of the contact or null if no nickname is set

setNickname

public void setNickname(java.lang.String sNickname)
Sets the nickname of the contact.
Parameters:
sNickname - the nickname of the contact or null if no nickname is set

getNamePrefix

public java.lang.String getNamePrefix()
Gets the name prefix of the contact.
Returns:
the name prefix of the contact (for example, Mr.) or null if no name prefix is set

setNamePrefix

public void setNamePrefix(java.lang.String sNamePrefix)
Sets the name prefix of the contact.
Parameters:
sNamePrefix - the name prefix of the contact (for example, Mr.) or null if no name prefix is set

getNameSuffix

public java.lang.String getNameSuffix()
Gets the name suffix of the contact.
Returns:
the name suffix of the contact (for example, Mr.) or null if no name suffix is set

setNameSuffix

public void setNameSuffix(java.lang.String sNameSuffix)
Sets the name suffix of the contact.
Parameters:
sNameSuffix - the name suffix of the contact (for example, Mr.) or null if no name suffix is set

getCustomNum1

public long getCustomNum1()
Gets the custom number1 field of the contact.
Returns:
the custom number1 field of the contact or null if the custom number1 field is not set

setCustomNum1

public void setCustomNum1(long lCustomNum1)
Sets the custom number1 field of the contact.
Parameters:
lCustomNum1 - the custom number1 field of the contact

getCustomNum2

public long getCustomNum2()
Gets the custom number2 field of the contact.
Returns:
the custom number2 field of the contact or null if the custom number2 field is not set

setCustomNum2

public void setCustomNum2(long lCustomNum2)
Sets the custom number2 field of the contact.
Parameters:
lCustomNum2 - the custom number2 field of the contact

getCustomNum3

public long getCustomNum3()
Gets the custom number3 field of the contact.
Returns:
the custom number3 field of the contact or null if the custom number3 field is not set

setCustomNum3

public void setCustomNum3(long lCustomNum3)
Sets the custom number3 field of the contact.
Parameters:
lCustomNum3 - the custom number3 field of the contact

getCustomStr1

public java.lang.String getCustomStr1()
Gets the custom string1 field of the contact.
Returns:
the custom string1 field of the contact or null if the custom string1 field is not set

setCustomStr1

public void setCustomStr1(java.lang.String sCustomStr1)
Sets the custom string1 field of the contact.
Parameters:
sCustomStr1 - the custom string1 field of the contact

getCustomStr2

public java.lang.String getCustomStr2()
Gets the custom string2 field of the contact.
Returns:
the custom string2 field of the contact or null if the custom string2 field is not set

setCustomStr2

public void setCustomStr2(java.lang.String sCustomStr2)
Sets the custom string2 field of the contact.
Parameters:
sCustomStr2 - the custom string2 field of the contact

getCustomStr3

public java.lang.String getCustomStr3()
Gets the custom string3 field of the contact.
Returns:
the custom string3 field of the contact or null if the custom string3 field is not set

setCustomStr3

public void setCustomStr3(java.lang.String sCustomStr3)
Sets the custom string3 field of the contact.
Parameters:
sCustomStr3 - the custom string3 field of the contact

getCustomStr4

public java.lang.String getCustomStr4()
Gets the custom string4 field of the contact.
Returns:
the custom string4 field of the contact or null if the custom string4 field is not set

setCustomStr4

public void setCustomStr4(java.lang.String sCustomStr4)
Sets the custom string4 field of the contact.
Parameters:
sCustomStr4 - the custom string4 field of the contact

getAccessManager

public AccessManager getAccessManager()
                               throws AccessManagerException
Gets the access manager for this contact. The access manager is used to modify the permissions.
Returns:
the access manager for this contact
Throws:
AccessManagerException - an error occurs retrieving the access manager
See Also:
ContactPermission

getGivenName

public java.lang.String getGivenName()
Gets the given name for a contact. The name is assembled with the form:

 [name prefix] [first name] [middle name] [last name] [name suffix]
 

If the given name is an empty string, the setting contact.given_name from contact_resources.properties is returned. This will prevent an empty string from being returned. If you wish to return the empty string, set contact.given_name to blank.

Returns:
the given name

setPrimaryTelephoneNumber

public void setPrimaryTelephoneNumber(PrimaryTelephoneNumber primary)
Sets the primary telephone number.
Parameters:
primary - the primary telephone number (may not be null)

getPrimaryTelephoneNumber

public PrimaryTelephoneNumber getPrimaryTelephoneNumber()
Gets the setting for the primary telephone number. When calling getTelephoneNumber(), the primary telephone number is returned.
Returns:
the primary telephone number setting

getTelephoneNumber

public java.lang.String getTelephoneNumber()
Gets the telephone number of the contact which is the primary telephone number.
Returns:
the telephone number of the contact or null if no telephone number is set

setMailingAddress

public void setMailingAddress(MailingAddress address)
Sets the mailing address of the contact.
Parameters:
address - the mailing address (may not be null)
See Also:
getAddressStreet(), getAddressPostOfficeBox(), getAddressCity(), getAddressPostalCode(), getAddressStateOrProvince(), getAddressCountry()

getMailingAddress

public MailingAddress getMailingAddress()
Gets the mailing address of the contact.
Returns:
the mailing address of the contact

getAddressStreet

public java.lang.String getAddressStreet()
Gets the street address of the contact which is the mailing address.
Returns:
the street address of the contact or null if no mailing address is set

getAddressPostOfficeBox

public java.lang.String getAddressPostOfficeBox()
Gets the post office box of the contact which is the mailing address.
Returns:
the post office box of the contact or null if no post office box is set

getAddressCity

public java.lang.String getAddressCity()
Gets the city of the contact which is the mailing address.
Returns:
the city of the contact or null if no city is set

getAddressPostalCode

public java.lang.String getAddressPostalCode()
Gets the postal code of the contact which is the mailing address.
Returns:
the postal code of the contact or null if no postal code is set

getAddressStateOrProvince

public java.lang.String getAddressStateOrProvince()
Gets the state or province of the contact which is the mailing address.
Returns:
the state or province of the contact or null if no state or province is set

getAddressCountry

public java.lang.String getAddressCountry()
Gets the country of the contact which is the mailing address.
Returns:
the country of the contact or null if no country is set

getAuthor

public java.lang.String getAuthor()
Gets the name of the author. The author is the name of the user who originally created this contact.
Returns:
the author name

setPictureImage

public void setPictureImage(BinaryData image)
Sets the picture image for the contact. This field can be used to store a picture image or other binary data associated with the contact.
Parameters:
pictureImage - the picture image (null for no picture image)

getPictureImage

public BinaryData getPictureImage()
Gets the picture image for the contact.
Returns:
the picture image or null for no image

getDateCreated

public java.util.Date getDateCreated()
Gets the date the contact was created.
Returns:
the date created

getDateLastModified

public java.util.Date getDateLastModified()
Gets the date the contact was last modified.
Returns:
the date last modified

update

public boolean update()
               throws java.security.AccessControlException
Updates the contact (saves the contact entry). This method must be called to commit changes to the contact.
Returns:
true if the update is successful; false otherwise
Throws:
java.security.AccessControlException - the user does not have edit permissions for this contact

update

public boolean update(boolean bForce)
               throws java.security.AccessControlException
Updates the contact (saves the contact entry). This method must be called to commit changes to the contact.
Parameters:
bForce - true to force the update; false otherwise (currently ignored)
Returns:
true if the update is successful; false otherwise
Throws:
java.security.AccessControlException - occurs if the user does not have permission to edit the contact

delete

public void delete()
            throws java.security.AccessControlException
Updates the contact (saves the contact entry). This method must be called to commit changes to the contact.

The update tokens must match in order for the update to occur. If the specified token is null, empty or does not match the token on the contact record, the update will not succeed.

Parameters:
sToken - the for update token (may not be null)
Returns:
true if the update is successful; false if the specified token and update token in the contact do not match
Throws:
java.security.AccessControlException - the user does not have edit permissions for this contact

delete

public void delete(boolean bArchive)
            throws java.security.AccessControlException
Deletes the contact.
Parameters:
bArchive - true to archive the contact; false to delete
Throws:
java.security.AccessControlException - occurs if the user does not have permission to delete the contact

toVcardString

public java.lang.String toVcardString()
Creates a string that contains the vCard compliant (RFC #2426) representation of the contact.
Returns:
the vCard string

toString

public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class java.lang.Object
Returns:
the string representation of the object

equals

public boolean equals(java.lang.Object obj)
Checks if the specified object is "equal to" this one. This does not check equals for all properties of the contact, only checks if the contact id matches.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this object is the same as the obj argument; false otherwise

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.