public class MetaContactListSource extends java.lang.Object implements ContactPresenceStatusListener, MetaContactListListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
UI_CONTACT_DATA_KEY
The data key of the MetaContactDescriptor object used to store a
reference to this object in its corresponding MetaContact.
|
static java.lang.String |
UI_GROUP_DATA_KEY
The data key of the MetaGroupDescriptor object used to store a
reference to this object in its corresponding MetaContactGroup.
|
Constructor and Description |
---|
MetaContactListSource() |
Modifier and Type | Method and Description |
---|---|
void |
childContactsReordered(MetaContactGroupEvent evt)
Reorders contact list nodes, when MetaContact-s in a
MetaContactGroup has been reordered.
|
void |
contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt)
Called whenever a change occurs in the PresenceStatus of one of the
contacts that we have subscribed for.
|
static UIContactImpl |
createUIContact(MetaContact metaContact)
Creates a UIContact for the given metaContact.
|
static UIGroup |
createUIGroup(MetaContactGroup metaGroup)
Creates a UIGroupDescriptor for the given metaGroup.
|
static java.util.Collection<SIPCommButton> |
getContactCustomActionButtons(MetaUIContact metaContact)
Returns all custom action buttons for this meta contact.
|
int |
getIndex()
Returns the index of the contact source in the result list.
|
static UIContactImpl |
getUIContact(MetaContact metaContact)
Returns the UIContact corresponding to the given
MetaContact.
|
static UIGroupImpl |
getUIGroup(MetaContactGroup metaGroup)
Returns the UIGroup corresponding to the given
MetaContactGroup.
|
boolean |
isMatching(java.util.regex.Pattern filterPattern,
MetaContactGroup metaGroup)
Checks if the given metaGroup is matching the current filter.
|
static boolean |
isNewGroup(MetaContactGroup metaGroup)
Returns whether MetaContactGroup is newly created.
|
static boolean |
isRootGroup(MetaContactGroup group)
Indicates if the given MetaContactGroup is the root group.
|
void |
metaContactAdded(MetaContactEvent evt)
Adds a node in the contact list, when a MetaContact has been
added in the MetaContactListService.
|
void |
metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
Notifies the tree model, when the MetaContact avatar has been
modified in the MetaContactListService.
|
void |
metaContactGroupAdded(MetaContactGroupEvent evt)
Adds a group node in the contact list, when a MetaContactGroup
has been added in the MetaContactListService.
|
void |
metaContactGroupModified(MetaContactGroupEvent evt)
Notifies the tree model, when a MetaContactGroup has been
modified in the MetaContactListService.
|
void |
metaContactGroupRemoved(MetaContactGroupEvent evt)
Removes the corresponding group node in the contact list, when a
MetaContactGroup has been removed from the
MetaContactListService.
|
void |
metaContactModified(MetaContactModifiedEvent evt)
Notifies the tree model, when a MetaContact has been
modified in the MetaContactListService.
|
void |
metaContactMoved(MetaContactMovedEvent evt)
Performs needed operations, when a MetaContact has been
moved in the MetaContactListService from one group to another.
|
void |
metaContactRemoved(MetaContactEvent evt)
Removes the corresponding contact node in the contact list, when a
MetaContact has been removed from the
MetaContactListService.
|
void |
metaContactRenamed(MetaContactRenamedEvent evt)
Refreshes the corresponding node, when a MetaContact has been
renamed in the MetaContactListService.
|
void |
protoContactAdded(ProtoContactEvent evt)
Adds a contact node corresponding to the parent MetaContact if
this last is matching the current filter and wasn't previously contained
in the contact list.
|
void |
protoContactModified(ProtoContactEvent evt)
Notifies the UI representation of the parent MetaContact that
this contact has been modified.
|
void |
protoContactMoved(ProtoContactEvent evt)
Adds the new MetaContact parent and removes the old one if the
first is matching the current filter and the last is no longer matching
it.
|
void |
protoContactRemoved(ProtoContactEvent evt)
Removes the contact node corresponding to the parent
MetaContact if the last is no longer matching the current filter
and wasn't previously contained in the contact list.
|
void |
queryMetaContactSource(java.util.regex.Pattern filterPattern,
MetaContactGroup parentGroup,
MetaContactQuery query,
int resultCount)
Filters the children in the given MetaContactGroup to match the
given filterPattern and stores the result in the given
treeModel.
|
static void |
removeUIContact(MetaContact metaContact)
Removes the UIContact from the given metaContact.
|
static void |
removeUIGroup(MetaContactGroup metaGroup)
Removes the descriptor from the given metaGroup.
|
void |
setIndex(int index)
Changes the index.
|
void |
startQuery(MetaContactQuery query,
java.util.regex.Pattern filterPattern)
Starts the query.
|
public static final java.lang.String UI_CONTACT_DATA_KEY
public static final java.lang.String UI_GROUP_DATA_KEY
public static UIContactImpl getUIContact(MetaContact metaContact)
metaContact
- the MetaContact, which corresponding UI
contact we're looking forpublic static UIGroupImpl getUIGroup(MetaContactGroup metaGroup)
metaGroup
- the MetaContactGroup, which UI group we're
looking forpublic static boolean isNewGroup(MetaContactGroup metaGroup)
metaGroup
- the MetaContactGroup, which we will check.public static UIContactImpl createUIContact(MetaContact metaContact)
metaContact
- the MetaContact for which we would like to
create an UIContactpublic static void removeUIContact(MetaContact metaContact)
metaContact
- the MetaContact, which corresponding UI
contact we would like to removepublic static UIGroup createUIGroup(MetaContactGroup metaGroup)
metaGroup
- the MetaContactGroup for which we would like to
create an UIContactpublic static void removeUIGroup(MetaContactGroup metaGroup)
metaGroup
- the MetaContactGroup, which descriptor we
would like to removepublic static boolean isRootGroup(MetaContactGroup group)
group
- the MetaContactGroup to checkpublic void startQuery(MetaContactQuery query, java.util.regex.Pattern filterPattern)
filterPattern
- the pattern to filter throughquery
- the query to be startedpublic void queryMetaContactSource(java.util.regex.Pattern filterPattern, MetaContactGroup parentGroup, MetaContactQuery query, int resultCount)
filterPattern
- the pattern to filter throughparentGroup
- the MetaContactGroup to filterquery
- the object that tracks the queryresultCount
- the initial result count we would insert directly to
the contact list without firing eventspublic boolean isMatching(java.util.regex.Pattern filterPattern, MetaContactGroup metaGroup)
filterPattern
- the filter pattern to check for matchesmetaGroup
- the MetaContactGroup to checkpublic void contactPresenceStatusChanged(ContactPresenceStatusChangeEvent evt)
ContactPresenceStatusListener
contactPresenceStatusChanged
in interface ContactPresenceStatusListener
evt
- the ContactPresenceStatusChangeEvent describing the status
change.public void childContactsReordered(MetaContactGroupEvent evt)
childContactsReordered
in interface MetaContactListListener
evt
- the MetaContactGroupEvent that notified uspublic void metaContactAdded(MetaContactEvent evt)
metaContactAdded
in interface MetaContactListListener
evt
- the MetaContactEvent that notified uspublic void metaContactGroupAdded(MetaContactGroupEvent evt)
metaContactGroupAdded
in interface MetaContactListListener
evt
- the MetaContactGroupEvent that notified uspublic void metaContactGroupModified(MetaContactGroupEvent evt)
metaContactGroupModified
in interface MetaContactListListener
evt
- the MetaContactGroupEvent that notified uspublic void metaContactGroupRemoved(MetaContactGroupEvent evt)
metaContactGroupRemoved
in interface MetaContactListListener
evt
- the MetaContactGroupEvent that notified uspublic void metaContactModified(MetaContactModifiedEvent evt)
metaContactModified
in interface MetaContactListListener
evt
- the MetaContactEvent that notified uspublic void metaContactMoved(MetaContactMovedEvent evt)
metaContactMoved
in interface MetaContactListListener
evt
- the MetaContactMovedEvent that notified uspublic void metaContactRemoved(MetaContactEvent evt)
metaContactRemoved
in interface MetaContactListListener
evt
- the MetaContactEvent that notified uspublic void metaContactRenamed(MetaContactRenamedEvent evt)
metaContactRenamed
in interface MetaContactListListener
evt
- the MetaContactRenamedEvent that notified uspublic void metaContactAvatarUpdated(MetaContactAvatarUpdateEvent evt)
metaContactAvatarUpdated
in interface MetaContactListListener
evt
- the MetaContactEvent that notified uspublic void protoContactAdded(ProtoContactEvent evt)
protoContactAdded
in interface MetaContactListListener
evt
- the ProtoContactEvent that notified uspublic void protoContactModified(ProtoContactEvent evt)
protoContactModified
in interface MetaContactListListener
evt
- the ProtoContactEvent that notified uspublic void protoContactMoved(ProtoContactEvent evt)
protoContactMoved
in interface MetaContactListListener
evt
- the ProtoContactEvent that notified uspublic void protoContactRemoved(ProtoContactEvent evt)
protoContactRemoved
in interface MetaContactListListener
evt
- the ProtoContactEvent that notified uspublic static java.util.Collection<SIPCommButton> getContactCustomActionButtons(MetaUIContact metaContact)
public int getIndex()
public void setIndex(int index)
index
- the new value.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.