|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl
public class ServerStoredContactListMsnImpl
This class encapsulates the Roster class. Once created, it will register itself as a listener to the encapsulated Roster and modify it's local copy of Contacts and ContactGroups every time an event is generated by the underlying framework. The class would also generate corresponding sip-communicator events to all events coming from smack.
| Field Summary | |
|---|---|
(package private) net.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl.ContactListListener |
contactListListener
Contact list listener. |
| Constructor Summary | |
|---|---|
ServerStoredContactListMsnImpl(OperationSetPersistentPresenceMsnImpl parentOperationSet,
ProtocolProviderServiceMsnImpl provider)
Creates a ServerStoredContactList wrapper for the specified BuddyList. |
|
| Method Summary | |
|---|---|
void |
addContact(ContactGroupMsnImpl parent,
String id)
Adds a new contact with the specified screenname to the list under the specified group. |
void |
addContact(String id)
Adds a new contact with the specified screenname to the list under a default location. |
protected void |
addContactForImageUpdate(ContactMsnImpl c)
when there is no image for contact we must retrieve it add contacts for image update |
(package private) void |
addGroupListener(ServerStoredGroupListener listener)
Registers the specified group listener so that it would receive events on group modification/creation/destruction. |
void |
createGroup(String groupName)
Creates the specified group on the server stored contact list. |
(package private) ContactMsnImpl |
createUnresolvedContact(ContactGroup parentGroup,
String id)
Creates a non resolved contact for the specified address and inside the specified group. |
(package private) ContactGroupMsnImpl |
createUnresolvedContactGroup(String groupName)
Creates a non resolved contact group for the specified name. |
(package private) ContactMsnImpl |
createVolatileContact(net.sf.jml.MsnContact contact)
Creates a non persistent contact for the specified address. |
(package private) ContactMsnImpl |
createVolatileContact(String id,
net.sf.jml.Email email,
String displayName)
Creates a non persistent contact for the specified address. |
ContactMsnImpl |
findContactById(String id)
Returns the Contact with the specified id or null if no such id was found. |
ContactGroup |
findContactGroup(ContactMsnImpl child)
Returns the ContactGroup containing the specified contact or null if no such group or contact exist. |
ContactGroupMsnImpl |
findContactGroup(String name)
Returns the ConntactGroup with the specified name or null if no such group was found. |
(package private) void |
fireContactAdded(ContactGroup parentGroup,
ContactMsnImpl contact)
Make the parent persistent presence operation set dispatch a contact added event. |
(package private) void |
fireContactResolved(ContactGroup parentGroup,
ContactMsnImpl contact)
Make the parent persistent presence operation set dispatch a contact resolved event. |
(package private) ProtocolProviderServiceMsnImpl |
getParentProvider()
Returns a reference to the provider that created us. |
ContactGroup |
getRootGroup()
Returns the root group of the contact list. |
(package private) boolean |
isInitialized()
Returns true if the contact list is initialized and ready for use, and false otherwise. |
void |
moveContact(ContactMsnImpl contact,
ContactGroup newParent)
Moves the specified contact to the group indicated by newParent. |
void |
printList()
used for debugging. |
(package private) void |
removeContact(ContactMsnImpl contactToRemove)
Removes a contact from the serverside list Event will come for successful operation |
void |
removeGroup(ContactGroupMsnImpl groupToRemove)
Removes the specified group from the buddy list. |
(package private) void |
removeGroupListener(ServerStoredGroupListener listener)
Removes the specified group listener so that it won't receive further events on group modification/creation/destruction. |
void |
renameGroup(ContactGroupMsnImpl groupToRename,
String newName)
Renames the specified group according to the specified new name.. |
(package private) void |
setDisplayName(ContactMsnImpl contact,
String newName)
Changes the contact display name on the server. |
(package private) void |
setMessenger(net.sf.jml.MsnMessenger messenger)
Sets the messenger instance impl of the lib which communicates with the server |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
net.java.sip.communicator.impl.protocol.msn.ServerStoredContactListMsnImpl.ContactListListener contactListListener
| Constructor Detail |
|---|
ServerStoredContactListMsnImpl(OperationSetPersistentPresenceMsnImpl parentOperationSet,
ProtocolProviderServiceMsnImpl provider)
parentOperationSet - the operation set that created us and that
we could use for dispatching subscription eventsprovider - the provider that has instantiated us.| Method Detail |
|---|
public ContactGroup getRootGroup()
void addGroupListener(ServerStoredGroupListener listener)
listener - the ServerStoredGroupListener to register for group
eventsvoid removeGroupListener(ServerStoredGroupListener listener)
listener - the ServerStoredGroupListener to unregisterProtocolProviderServiceMsnImpl getParentProvider()
public ContactGroupMsnImpl findContactGroup(String name)
name - the name of the group we're looking for.
public ContactMsnImpl findContactById(String id)
id - the id of the contact to find.
public ContactGroup findContactGroup(ContactMsnImpl child)
child - the contact whose parent group we're looking for.
public void addContact(String id)
throws OperationFailedException
id - the id of the contact to add.
OperationFailedException
public void addContact(ContactGroupMsnImpl parent,
String id)
throws OperationFailedException
id - the id of the contact to add.parent - the group under which we want the new contact placed.
OperationFailedException - if the contact already existContactMsnImpl createVolatileContact(net.sf.jml.MsnContact contact)
contact - the address of the contact to create.
ContactMsnImpl createVolatileContact(String id,
net.sf.jml.Email email,
String displayName)
id - the id of the contact to createemail - the e-mail address of the contact to createdisplayName - the display name of the contact to create
ContactMsnImpl createUnresolvedContact(ContactGroup parentGroup,
String id)
parentGroup - the group where the unresolved contact is to be
createdid - the Address of the contact to create.
ContactGroupMsnImpl createUnresolvedContactGroup(String groupName)
groupName - the name of the group to create.
public void createGroup(String groupName)
throws OperationFailedException
groupName - a String containing the name of the new group.
OperationFailedException - with code CONTACT_GROUP_ALREADY_EXISTS
if the group we're trying to create is already in our contact list.public void removeGroup(ContactGroupMsnImpl groupToRemove)
groupToRemove - the group that we'd like removed.void removeContact(ContactMsnImpl contactToRemove)
contactToRemove - ContactMsnImpl
public void renameGroup(ContactGroupMsnImpl groupToRename,
String newName)
groupToRename - the group that we'd like removed.newName - the new name of the group
public void moveContact(ContactMsnImpl contact,
ContactGroup newParent)
contact - the contact that we'd like moved under the new group.newParent - the group where we'd like the parent placed.
void fireContactAdded(ContactGroup parentGroup,
ContactMsnImpl contact)
parentGroup - the group where the new contact was addedcontact - the contact that was added
void fireContactResolved(ContactGroup parentGroup,
ContactMsnImpl contact)
parentGroup - the group that the resolved contact belongs to.contact - the contact that was resolvedboolean isInitialized()
void setDisplayName(ContactMsnImpl contact,
String newName)
contact - the contact to change,newName - the new name.void setMessenger(net.sf.jml.MsnMessenger messenger)
messenger - MsnMessengerprotected void addContactForImageUpdate(ContactMsnImpl c)
c - ContactMsnImplpublic void printList()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||