|
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.yahoo.AbstractContactGroupYahooImpl
net.java.sip.communicator.impl.protocol.yahoo.ContactGroupYahooImpl
public class ContactGroupYahooImpl
The Yahoo implementation of the ContactGroup interface. Intances of this class (contrary to RootContactGroupYahooImpl) may only contain buddies and cannot have sub groups. Note that instances of this class only use the corresponding smack source group for reading their names and only initially fill their buddies java.util.List with the ContactYahooImpl objects corresponding to those contained in the source group at the moment it is being created. They would, however, never try to sync or update their contents ulteriorly. This would have to be done through the addContact()/removeContact() methods. The content of buddies is created on creating of the group and when the smack source group is changed.
| Constructor Summary | |
|---|---|
ContactGroupYahooImpl(String id,
ServerStoredContactListYahooImpl ssclCallback)
|
|
ContactGroupYahooImpl(ymsg.network.YahooGroup yahooGroup,
Vector<ymsg.network.YahooUser> groupMembers,
ServerStoredContactListYahooImpl ssclCallback,
boolean isResolved)
Creates an Yahoo group using the specified YahooGroup as a source. |
|
| Method Summary | |
|---|---|
(package private) void |
addContact(ContactYahooImpl contact)
Adds the specified contact to the end of this group. |
boolean |
canContainSubgroups()
Determines whether the group may contain subgroups or not. |
Iterator<Contact> |
contacts()
Returns an Iterator over all contacts, member of this ContactGroup. |
int |
countContacts()
Returns the number of Contact members of this ContactGroup |
int |
countSubgroups()
Returns the number of subgroups contained by this group, which is always 0 since sub groups in the protocol may only be contained by the root group - RootContactGroupImpl. |
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this group. |
(package private) ContactYahooImpl |
findContact(String id)
Returns the contact encapsulating with the spcieified name or null if no such contact was found. |
Contact |
getContact(String id)
Returns the Contact with the specified address or identifier. |
ContactGroup |
getGroup(int index)
Returns the subgroup with the specified index (i.e. |
ContactGroup |
getGroup(String groupName)
Returns the subgroup with the specified name. |
String |
getGroupName()
Returns the name of this group. |
ContactGroup |
getParentContactGroup()
Returns a reference to the root group which in Yahoo is the parent of any other group since the protocol does not support subgroups. |
String |
getPersistentData()
Returns null as no persistent data is required and the contact address is sufficient for restoring the contact. |
ProtocolProviderService |
getProtocolProvider()
Returns the protocol provider that this group belongs to. |
(package private) ymsg.network.YahooGroup |
getSourceGroup()
The source group we are encapsulating |
String |
getUID()
Returns a String that uniquely represnets the group. |
int |
hashCode()
Returns a hash code value for the object, which is actually the hashcode value of the groupname. |
boolean |
isPersistent()
Determines whether or not this contact group is being stored by the server. |
boolean |
isResolved()
Determines whether or not this contact group has been resolved against the server. |
(package private) void |
removeContact(ContactYahooImpl contact)
Removes the specified contact from this contact group |
(package private) void |
setResolved(ymsg.network.YahooGroup yahooGroup)
Resolve this contact group against the specified group |
(package private) void |
setSourceGroup(ymsg.network.YahooGroup newGroup)
Change the source group change the buddies |
Iterator<ContactGroup> |
subgroups()
Returns an empty iterator. |
String |
toString()
Returns a string representation of this group, in the form YahooGroup.GroupName[size]{ buddy1.toString(), buddy2.toString(), ...}. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
ContactGroupYahooImpl(ymsg.network.YahooGroup yahooGroup,
Vector<ymsg.network.YahooUser> groupMembers,
ServerStoredContactListYahooImpl ssclCallback,
boolean isResolved)
yahooGroup - the Yahoo Group correspoinding to the groupgroupMembers - the group members that we should add to the group.ssclCallback - a callback to the server stored contact list
we're creating.isResolved - a boolean indicating whether or not the group has been
resolved against the server.
ContactGroupYahooImpl(String id,
ServerStoredContactListYahooImpl ssclCallback)
| Method Detail |
|---|
public int countContacts()
public ContactGroup getParentContactGroup()
void addContact(ContactYahooImpl contact)
contact - the new contact to add to this groupvoid removeContact(ContactYahooImpl contact)
contact - the contact to remove.public Iterator<Contact> contacts()
public Contact getContact(String id)
id - the addres or identifier of the Contact we are
looking for.
public String getGroupName()
public boolean canContainSubgroups()
public ContactGroup getGroup(int index)
index - the index of the ContactGroup to retrieve.
public ContactGroup getGroup(String groupName)
groupName - the name of the ContactGroup to retrieve.
public Iterator<ContactGroup> subgroups()
public int countSubgroups()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectobj - the reference object with which to compare.
public ProtocolProviderService getProtocolProvider()
public String toString()
toString in class ObjectContactYahooImpl findContact(String id)
id - the id for the contact we're looking for.
public boolean isPersistent()
public String getPersistentData()
public boolean isResolved()
void setResolved(ymsg.network.YahooGroup yahooGroup)
yahooGroup - the server stored grouppublic String getUID()
ymsg.network.YahooGroup getSourceGroup()
void setSourceGroup(ymsg.network.YahooGroup newGroup)
newGroup - YahooGroup
|
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 | |||||||||