Overview

What is a Contact

A contact is any individual whom you identify as someone you know, and would like to store as individual entries in your address book. Dekoh allows each user to maintain an address book, where the user can use the contact to record information for an individual, which can consist of one or more optional elements, along with a person’s E-mail address or Dekoh ID.

Why Add Contacts?

Adding contacts is the easiest and the most streamlined way to identify, store, and keep track of details for all your friends and family. Dekoh allows you to manage your contacts and also group them (using tags) for quicker identification.

To start sharing your applications with your friends, you must first add them as contacts. To add contacts to your list, you can either use their E-mail addresses or Dekoh IDs.

You can also import your entire contact list from your AOL/OutlookExpress/Hotmail/Gmail/Yahoo Address book at one go, using the Import Contacts feature available in Dekoh User Interface. Dekoh integrates Plaxo widget with the People Chooser widget to help you import all contacts from your gmail and yahoo address books. To know more on this, read the “User Interface Reference Documentation”. Adding a Dekoh ID to your contacts list makes it possible for you to leverage all the functionalities such as syndication (RSS), and inter-application communication.

Understanding the Contact Properties

Use the Contacts properties to store e-mail address, locations, multiple phone numbers, and any other information that relates to the contact. A contact can have the following properties:
  • Contact ID: Use this to define a contact in your address book. You may either add an E-mail address or a Dekoh ID to define the contact ID. This is a mandatory field for a contact.
  • Display Name: A display (nick) name to specify how you want the contact's name to appear. Though not mandatory, this will help you.
  • First Name: When you enter a name for a contact, Dekoh stores in separate parts and puts each part in a separate field. The first name of a contact is defined here.
  • Last Name: Use this to define the last name of a contact.
  • Location(s): Use this to define the location/address for a contact. You can define multiple locations for one contact, such as office, home and so on.
  • Group(s): Use this to define the groups to which your contact belongs. You can define multiple groups for one contact.
  • Other Email ID(s): Additional email addresses defined for the contact. The email addresses defined here are not used for sending out alert mails.
  • Phone Number(s): Define the contact’s phone number in this field. You can define multiple numbers for one contact.

Creating a Contact

To create a contact, your session must be authenticated. Use the class, com.pramati.bfly.das.api.DesktopUser to retrieve the Desktop User for an authenticated session. The main participant for authenticating the session is the LoginManager API, which helps validate credentials and sets the authenticated session. For subsequent requests made on this session, you can use com.pramati.bfly.das.helper.SessionUtil.

Refer to the “Security Reference Document” for further details.

Once your session is authenticated, use the method, getAddressBookForUser() to get the address book for a logged-in Desktop User (for this session). You can retrieve the instance of Desktop User who is currently logged in by invoking com.pramati.bfly.das.helper.SessionUtil#getLoggedInDesktopUser(). This is useful in scenarios where more than one individual uses the same Desktop to login to Dekoh.

com.pramati.bfly.das.contacts.helper.AddressBook - helper for adding and deleting contacts.
	* getAddressBookForUser() 
	* addContact()
	* inviteUser()
	* updateContact()
	* deleteContact()
	* getContactInfoForUser()
	* getAllContacts()
	* getContactsForTag()
	* getTags()

Once you have retrieved the address book, you can add, update, and delete contacts using this address book. You can add contacts to the address book in two different ways:

  • addContact(): Use the addContact() method to add a new contact to the current Desktop User’s address book with details such as display name, first name, last name and so on. Dekoh will map this contact to a Dekoh account using Contact#getContactIdName(). When you add the contact, the contact gets added to your address book and the data successfully synchronized with Dekoh network, but no E-mail notification is sent to alert them about the same.
  • inviteUser(): Use the inviteUser() method to send out an invite to a person to become a mutual contact. You can use either the Dekoh ID or Email address to invite the person. When you invoke this method, an E-mail alert is sent to the person asking for acceptance.

If you invite someone who's never registered before on Dekoh, the method first adds the new contact in your address book. It also sends an invitation to the contact to register with Dekoh network and add you (DesktopUser) in his (invitees’) address book. The invitee is then guided through the registration process and after completion of the registration process, asked to accept invitation to become mutual buddies. Once the person "accepts" the invitation, you get added as a contact in his/her address book.

If you invite someone who is already a registered Dekoh user, the method successfully adds the new contact in your address book and then sends an invite (to the email address the invitee has used while registering with Dekoh) to add you (DesktopUser) in his (invitees’) address book. Once the person "accepts" the invitation, you get added as a contact in his/her address book.

Dekoh lets you create groups to sort your contacts. You group contacts in Dekoh by tagging them. A contact may be in more than one group. Use the getTags() method to retrieve the list of all tag names used by this Desktop User to group contacts in the address book. It returns an empty list if no tags were defined by the Desktop User.

You can also use other finder methods, such as getContactInfoForUser() to get information of a specific contact. Use getAllContacts() to get a list of all the contacts in your address book. Use getContactsForTag() to get a list of contacts tagged with a specific tag name.

Storing Contacts

The information you store about your contacts are stored in the Dekoh Network, to make it available across multiple desktops from where a DesktopUser logs into Dekoh. The contacts information, though stored in Dekoh Network, is also cached (persisted) locally using the Derby database.

Whenever the user logs-in to Dekoh, the contacts information synchronizes with the contacts information on Dekoh network. This information is always stored under the directory, /<Dekoh_Installation_Dir>/server/user-data/Personal_Server/contacts/db in your local machine.

Since Dekoh always searches for the contact information on your local machine and not on the Dekoh network, it saves bandwidth.