|
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 | |||||||||
public interface MetaContactGroup
MetaContactGroups are used to merge groups (often originating in different protocols).
A MetaContactGroup may contain contacts and some groups may also have sub-groups as children. To verify whether or not a particular group may contain subgroups, a developer has to call the canContainSubgroups() method
| Method Summary | |
|---|---|
boolean |
canContainSubgroups()
Determines whether or not this group can contain subgroups. |
boolean |
contains(MetaContact contact)
Returns true if and only if contact is a direct child of this group. |
boolean |
contains(MetaContactGroup group)
Returns true if and only if group is a direct subgroup of this MetaContactGroup. |
int |
countChildContacts()
Returns the number of MetaContacts that this group contains |
int |
countContactGroups()
Returns the number of ContactGroupss that this group encapsulates |
int |
countOnlineChildContacts()
Returns the number of online MetaContacts that this group contains. |
int |
countSubgroups()
Returns the number of subgroups that this MetaContactGroup contains. |
Iterator<MetaContact> |
getChildContacts()
Returns a java.util.Iterator over the MetaContacts contained in this MetaContactGroup. |
ContactGroup |
getContactGroup(String groupName,
ProtocolProviderService ownerProvider)
Returns a contact group encapsulated by this meta contact group, having the specified groupName and coming from the indicated ownerProvider. |
Iterator<ContactGroup> |
getContactGroups()
Returns an iterator over all the protocol specific groups that this contact group represents. |
Iterator<ContactGroup> |
getContactGroupsForAccountID(String accountID)
Returns all protocol specific ContactGroups, encapsulated by this MetaContactGroup and coming from the provider matching the accountID param. |
Iterator<ContactGroup> |
getContactGroupsForProvider(ProtocolProviderService provider)
Returns all protocol specific ContactGroups, encapsulated by this MetaContactGroup and coming from the indicated ProtocolProviderService. |
Object |
getData(Object key)
Gets the user data associated with this instance and a specific key. |
String |
getGroupName()
Returns the name of this group. |
MetaContact |
getMetaContact(int index)
Returns the meta contact on the specified index. |
MetaContact |
getMetaContact(ProtocolProviderService provider,
String contactID)
Returns the meta contact encapsulating a contact belonging to the specified provider with the specified identifier. |
MetaContact |
getMetaContact(String metaUID)
Returns the contact with the specified identifier |
MetaContactGroup |
getMetaContactSubgroup(int index)
Returns the MetaContactGroup with the specified index. |
MetaContactGroup |
getMetaContactSubgroup(String groupName)
Returns the MetaContactGroup with the specified name. |
String |
getMetaUID()
Returns a String identifier (the actual contents is left to implementations) that uniquely represents this MetaContact in the containing MetaContactList |
MetaContactGroup |
getParentMetaContactGroup()
Returns the MetaContactGroup currently containing this group or null if this is the root group |
Iterator<MetaContactGroup> |
getSubgroups()
Returns an java.util.Iterator over the sub groups that this MetaContactGroup contains. |
int |
indexOf(MetaContact metaContact)
Returns the index of metaContact in relation to other contacts in this or -1 if metaContact does not belong to this group. |
int |
indexOf(MetaContactGroup metaContactGroup)
Returns the index of metaContactGroup in relation to other subgroups in this group or -1 if metaContact does not belong to this group. |
boolean |
isPersistent()
Determines whether or not this meta group contains only groups that are being stored by a server. |
void |
setData(Object key,
Object value)
Sets a user-specific association in this instance in the form of a key-value pair. |
String |
toString()
Returns a String representation of this group and the contacts it contains (may turn out to be a relatively long string). |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
Iterator<ContactGroup> getContactGroups()
Note to implementors: In order to prevent problems with concurrency, the Iterator returned by this method should not be over the actual list of groups but rather over a copy of that list.
Iterator<ContactGroup> getContactGroupsForProvider(ProtocolProviderService provider)
Note to implementors: In order to prevent problems with concurrency, the Iterator returned by this method should not be over the actual list of groups but rather over a copy of that list.
provider - a reference to the ProtocolProviderService
whose ContactGroups we'd like to get.
Iterator<ContactGroup> getContactGroupsForAccountID(String accountID)
Note to implementors: In order to prevent problems with concurrency, the Iterator returned by this method should not be over the actual list of groups but rather over a copy of that list.
accountID - the id of the account whose contact groups we'd like to
retrieve.
boolean contains(MetaContact contact)
contact - the MetaContact whose relation to this group
we'd like to determine.
boolean contains(MetaContactGroup group)
group - the MetaContactGroup whose relation to this group
we'd like to determine.
ContactGroup getContactGroup(String groupName,
ProtocolProviderService ownerProvider)
groupName - the name of the contact group who we're looking for.ownerProvider - a reference to the ProtocolProviderService that
the contact we're looking for belongs to.
Iterator<MetaContact> getChildContacts()
Note to implementors: In order to prevent problems with concurrency, the Iterator returned by this method should not be over the actual list of contacts but rather over a copy of that list.
int countChildContacts()
int countOnlineChildContacts()
int countContactGroups()
Iterator<MetaContactGroup> getSubgroups()
Note to implementors: In order to prevent problems with concurrency, the Iterator returned by this method should not be over the actual list of groups but rather over a copy of that list.
int countSubgroups()
boolean canContainSubgroups()
MetaContact getMetaContact(ProtocolProviderService provider,
String contactID)
provider - the ProtocolProviderService that the specified
contactID is pertaining to.contactID - a String identifier of the protocol specific contact
whose container meta contact we're looking for.
MetaContact getMetaContact(String metaUID)
metaUID - a String identifier obtained through the
MetaContact.getMetaUID() method.
int indexOf(MetaContact metaContact)
metaContact - the MetaContact whose index we're looking
for.
int indexOf(MetaContactGroup metaContactGroup)
metaContactGroup - the MetaContactGroup whose index we're
looking for.
MetaContact getMetaContact(int index)
throws IndexOutOfBoundsException
index - the index of the meta contact to return.
IndexOutOfBoundsException - in case index is
not a valid index for this group.String getGroupName()
MetaContactGroup getMetaContactSubgroup(String groupName)
groupName - the name of the group to return.
MetaContactGroup getMetaContactSubgroup(int index)
throws IndexOutOfBoundsException
index - the index of the group to return.
IndexOutOfBoundsException - if index is not
a valid index.MetaContactGroup getParentMetaContactGroup()
String toString()
toString in class ObjectString getMetaUID()
Object getData(Object key)
key - the key of the user data associated with this instance to be
retrieved
Object which represents the value associated with
this instance and the specified key; null
if no association with the specified key exists in
this instance
void setData(Object key,
Object value)
key is already associated
in this instance with a value, the existing value is overwritten with the
specified value.
The user-defined association created by this method and stored in this instance is not serialized by this instance and is thus only meant for runtime use.
The storage of the user data is implementation-specific and is thus not guaranteed to be optimized for execution time and memory use.
key - the key to associate in this instance with the specified valuevalue - the value to be associated in this instance with the specified
keyboolean isPersistent()
|
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 | |||||||||