org.eclipse.ecf.protocol.msn
Class ContactList

java.lang.Object
  extended by org.eclipse.ecf.protocol.msn.ContactList

public final class ContactList
extends java.lang.Object

A ContactList stores a list of Contacts.

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Method Summary
 void addContact(java.lang.String email, java.lang.String userName)
          Adds the contact with the specified email to this list.
 void addContactListListener(IContactListListener listener)
          Adds a IContactListener to this.
 Contact getContact(java.lang.String email)
          Returns the contact that uses the specified email address.
 java.util.Collection getContacts()
           
 java.util.Collection getGroups()
           
 void removeContact(Contact contact)
          Removes the specified contact from the user's list.
 void removeContactsListListener(IContactListListener listener)
          Removes a IContactListener from this.
 void removeGroup(Group group)
          Removes the specified group from the user's list.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addContact

public void addContact(java.lang.String email,
                       java.lang.String userName)
                throws java.io.IOException
Adds the contact with the specified email to this list.

Parameters:
email - the contact's email address
userName - the name to be assigned to this contact, or null if one does not need to be assigned
Throws:
java.io.IOException - If an I/O error occurs while attempting to send the request to the server

removeContact

public void removeContact(Contact contact)
                   throws java.io.IOException
Removes the specified contact from the user's list.

Parameters:
contact - the contact to remove
Throws:
java.io.IOException - If an I/O error occurs while attempting to send the request to the server

removeGroup

public void removeGroup(Group group)
                 throws java.io.IOException
Removes the specified group from the user's list.

Parameters:
group - the group to remove
Throws:
java.io.IOException - If an I/O error occurs while attempting to send the request to the server

getContact

public Contact getContact(java.lang.String email)
Returns the contact that uses the specified email address. The search performed is case-sensitive.

Parameters:
email - the email address of the desired contact
Returns:
the contact that is associated with the given email address, or null if none could be found

getContacts

public java.util.Collection getContacts()

getGroups

public java.util.Collection getGroups()

addContactListListener

public void addContactListListener(IContactListListener listener)
Adds a IContactListener to this.

Parameters:
listener - the listener to be added

removeContactsListListener

public void removeContactsListListener(IContactListListener listener)
Removes a IContactListener from this.

Parameters:
listener - the listener to be removed

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object