Dekoh platform API

com.pramati.bfly.das.contacts.persistence
Class Contact

java.lang.Object
  extended by User
      extended by com.pramati.bfly.das.contacts.persistence.Contact

public class Contact
extends User

A Contact represents an entry in this user's AddressBook.

Creating a contact is necessary to share applications over Dekoh network.

For example : To add joe@example.com as a Contact invoke method myAddressBook.addContact("joe@example.com"). After adding joe@example.com as a Contact, any installed Dekoh application can be shared.

Contacts can also be added by dekoh user id using the same method.

Since:
14 Feb, 2007
See Also:
getAddressBookForUser

Constructor Summary
protected Contact()
           
  Contact(String contactIdName, String displayName, String firstName, String lastName)
          For creating a Contact Object.
 
Method Summary
 void addDate(DateObj date)
           
 void addEmailId(Email emailId)
           
 void addLocation(Location location)
           
 void addPhone(Phone phone)
           
 void addTag(Tag tag)
           
 void clearAllDates()
           
 void clearAllEmailAddress()
           
 void clearAllLocations()
           
 void clearAllPhoneNos()
           
 void clearAllTags()
           
 String getContactIdName()
           
 String getContactKey()
           
 String getContactName()
          For getting the ContactName.
 List getDates()
           
 List getEmailIds()
           
 List getLocations()
           
 List getPhoneNos()
           
 List getTags()
           
 boolean isBuddy()
           
 void setBuddy(boolean buddy)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Contact

protected Contact()

Contact

public Contact(String contactIdName,
               String displayName,
               String firstName,
               String lastName)
For creating a Contact Object.

Parameters:
contactIdName - ContactId used for refering a Contact. This could be an valid emailAddress or valid Dekoh User Id. Only this field is mandatory for creating the contact.
displayName - Display Name of the contact.
firstName - First Name of the contact.
lastName - Last Name of the contact.
Method Detail

getContactKey

public String getContactKey()

getContactIdName

public String getContactIdName()

isBuddy

public boolean isBuddy()

setBuddy

public void setBuddy(boolean buddy)

getEmailIds

public List getEmailIds()

addEmailId

public void addEmailId(Email emailId)

clearAllEmailAddress

public void clearAllEmailAddress()

getLocations

public List getLocations()

addLocation

public void addLocation(Location location)

clearAllLocations

public void clearAllLocations()

getTags

public List getTags()

addTag

public void addTag(Tag tag)

clearAllTags

public void clearAllTags()

getPhoneNos

public List getPhoneNos()

addPhone

public void addPhone(Phone phone)

clearAllPhoneNos

public void clearAllPhoneNos()

getDates

public List getDates()

addDate

public void addDate(DateObj date)

clearAllDates

public void clearAllDates()

getContactName

public String getContactName()
For getting the ContactName. It is derived as follows
 
  • Display Name if not null, else
  • FirstName #getLastName() if both First Name and Last Name are non null, else
  • First Name if not null, else
  • Last Name if not null, else
  • ContactId with which this contact is created.

use this method for displaying the Name for a contact.

Returns:
Contact Name to be displayed.

toString

public String toString()

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers