|
Working With Contacts On Dekoh
OverviewWhat is a ContactA 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 PropertiesUse 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:
Creating a ContactTo 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:
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 ContactsThe 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. |