com.lokan.gmlib
Class GMContactManager

java.lang.Object
  extended by com.lokan.gmlib.GMContactManager

public class GMContactManager
extends java.lang.Object


Constructor Summary
GMContactManager(GMSession session)
          Creates new instance.
 
Method Summary
 GMContact addGMContact(GMContact contact)
          Adds an contact.
 GMContact[] getAllGMContacts()
          Returns all contacts.
 void removeGMContact(GMContact contact)
          Removes an contact.
 void removeGMContacts(GMContact[] contacts)
          Removes an contacts.
 void updateGMContact(GMContact contact)
          Updates an contact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMContactManager

public GMContactManager(GMSession session)
Creates new instance.

Parameters:
session - GMSession to use.
Method Detail

getAllGMContacts

public GMContact[] getAllGMContacts()
Returns all contacts.

Returns:
Returns all contacts.
Throws:
GMException - Throws a exception if retrieve fails for some reason.

addGMContact

public GMContact addGMContact(GMContact contact)
Adds an contact.

Parameters:
contact - Contact to add.
Returns:
Returns new contact with id set
Throws:
java.lang.IllegalArgumentException - is thrown when contact is already added (equals to id is not null).
GMException - is thrown when add fails.

updateGMContact

public void updateGMContact(GMContact contact)
Updates an contact.

Parameters:
contact - Contact to update.
Throws:
java.lang.IllegalArgumentException - is thrown when contact is not added (equals to id is null).
GMException - is thrown when update fails.

removeGMContacts

public void removeGMContacts(GMContact[] contacts)
Removes an contacts.

Parameters:
contacts - Contacts to remove.
Throws:
java.lang.IllegalArgumentException - is thrown when contacts is not added (equals to id is null).
GMException - is thrown when removal fails.

removeGMContact

public void removeGMContact(GMContact contact)
Removes an contact.

Parameters:
contact - Contact to remove.
Throws:
java.lang.IllegalArgumentException - is thrown when contact is not added (equals to id is null).
GMException - is thrown when removal fails.


Copyright © 2007. All Rights Reserved.