|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pramati.bfly.das.contacts.helper.AddressBook
public class AddressBook
AddressBook is a collection of a Dekoh user's Contacts. Contacts can be added/deleted/updated to an
AdrressBook.
AddressBook.getAddressBookForUser(DesktopUser).
One way to obtain the DesktopUser is by invoking SessionUtil.getLoggedInDesktopUser(request) with a request Object. This request should be part of the Session, in
which user has logged into this Dekoh Desktop.
| Method Summary | |
|---|---|
Contact |
addContact(Contact contact)
Adds a new contact to this desktopUser's AddressBook |
Contact |
addContact(String contactId)
Equivalent to calling AddressBook.addContact(com.pramati.bfly.das.contacts.persistence.Contact) after creating
Contact instance with given contactId. |
void |
deleteContact(Contact contact)
Deletes an existing Contact from this Dekoh user's AddressBook. |
static AddressBook |
getAddressBookForUser(DesktopUser desktopUser)
Gets the AddressBook of given DekohUser. |
List |
getAllContacts()
|
Contact |
getContactInfoForUser(String contactId)
Retrieves the Contact information for the given contact Id. |
List |
getContactsForTag(String tagName)
|
List |
getTags()
|
void |
inviteUser(String contactId)
Sends an invitation to contactId to register with Dekoh network and become mutual contacts. |
Contact |
updateContact(Contact contact)
Updates the user profile of an existing contact in DesktopUser's AddressBook. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AddressBook getAddressBookForUser(DesktopUser desktopUser)
DekohUser. Instance of DesktopUser who is currently logged in can be
obtained by invoking SessionUtil.getLoggedInDesktopUser(request) method.
desktopUser - DekohUser for whom the addressBook is needed. Cannot be null. This needs to be a valid
DekohUser, i.e should be a registered DekohUser with a valid dekohId.
public Contact addContact(String contactId)
throws ContactsException,
CASNotReachableException,
UserOfflineException,
ForbiddenException
AddressBook.addContact(com.pramati.bfly.das.contacts.persistence.Contact) after creating
Contact instance with given contactId.
contactId - email address or Dekoh User Id of the contact to add. It is assumed to be an email address, if
this string has one '@' and a '.' in string following '@'.
Contact instance representing the newly added contact.
ContactsException
CASNotReachableException
UserOfflineException
ForbiddenException
public Contact addContact(Contact contact)
throws ContactsException,
CASNotReachableException,
UserOfflineException,
ForbiddenException
AddressBook with given Contact
instance. After successful adding and synchronising with central server, a Contact object
representing this contact is returned.
ContactsListener.contactAdded listener callbacks are given after successful adding the contact.
- Parameters:
contact - contact object with details like displayName, firstName, lastName etc. For mapping this contact to
an dekoh account ContactIdName is used.
- Returns:
Contact instance representing the newly added contact.
- Throws:
ContactsException - If unable to add a contact. one of the following could be the reasons for
getting this exception - contactId null or empty.
- loggedin user is not
a valid registered DekohUser. Only DekohUsers who have registered and got a
valid dekohid can add Contacts.
- some exception on central server while
adding the contact.
UserOfflineException - If User is logged into Dekoh Desktop in offline mode.
CASNotReachableException - If for any reason, Central server is not reachable.
ForbiddenException - If the authenticated Session from central server on this DekohDesktop has
expired. Desktop user should logoff and login again, before trying any other
contacts operation.
public void inviteUser(String contactId)
throws ContactsException,
CASNotReachableException,
UserOfflineException,
ForbiddenException
contactId - email address or Dekoh User Id of the contact to invite. It is assumed to be an email address,
if this string has one '@' and a '.' in string following '@'.
ContactsException - If unable to add a contact. one of the following could be the reasons for
getting this exception UserOfflineException - If User is logged into Dekoh Desktop in offline mode.
CASNotReachableException - If for any reason, Central server is not reachable.
ForbiddenException - If the authenticated Session from central server on this DekohDesktop has
expired. Desktop user should logoff and login again, before trying any other
contacts operation.
public Contact updateContact(Contact contact)
throws ContactsException,
CASNotReachableException,
UserOfflineException,
ForbiddenException
AddressBook.
ContactsListener.contactUpdated listener callback are given after successful inviting and updating the contact.
contact - Contact containing the information to be updated.
Contact instance representing the updated contact.
ContactsException - If unable to update a contact. one of the following could be the reasons for
getting this exception UserOfflineException - If User is logged into Dekoh Desktop in offline mode.
CASNotReachableException - If for any reason, Central server is not reachable.
ForbiddenException - If the authenticated Session from central server on this DekohDesktop has
expired. Desktop user should logoff and login again, before trying any other
contacts operation.
public void deleteContact(Contact contact)
throws ContactsException,
CASNotReachableException,
UserOfflineException,
ForbiddenException
AddressBook. Deleted contact cannot
access any shared Dekoh applications from this user's Dekoh installations.
ContactsListener.contactDeleted listener callback is invoked after successfully deleting the Contact.
contact - Contact to be deleted.
ContactsException - If no such Contact exists in this dekoh user's AddressBook.
UserOfflineException - If User is logged into Dekoh Desktop in offline mode.
CASNotReachableException - If for any reason, Central server is not reachable.
ForbiddenException - If the authenticated Session from central server on this DekohDesktop has
expired. Desktop user should logoff and login again, before trying any other
contacts operation.public Contact getContactInfoForUser(String contactId)
Contact information for the given contact Id.
contactId - ContactId is the dekoh user id or the email address with which this Dekoh user used to add this
contact.
public List getAllContacts()
AddressBook, or an empty list if no
contacts were added.public List getContactsForTag(String tagName)
tagName - tag which this Dekoh user used to group related contacts.
public List getTags()
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers