diff options
author | Damian Minkov <damencho@jitsi.org> | 2006-09-21 08:30:19 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2006-09-21 08:30:19 +0000 |
commit | 81122e932e7db0c8aea1e34695c3fd9156d37678 (patch) | |
tree | c5e504651c9b24b2757b76469b4b8641b904d056 /src/net/java/sip/communicator/impl/protocol/jabber/VolatileContactGroupJabberImpl.java | |
parent | ef693e8472f5f7fc244e9e91476176786f0e4a3a (diff) | |
download | jitsi-81122e932e7db0c8aea1e34695c3fd9156d37678.zip jitsi-81122e932e7db0c8aea1e34695c3fd9156d37678.tar.gz jitsi-81122e932e7db0c8aea1e34695c3fd9156d37678.tar.bz2 |
Jabber impl
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/VolatileContactGroupJabberImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/VolatileContactGroupJabberImpl.java | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/VolatileContactGroupJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/VolatileContactGroupJabberImpl.java new file mode 100644 index 0000000..3795e2f --- /dev/null +++ b/src/net/java/sip/communicator/impl/protocol/jabber/VolatileContactGroupJabberImpl.java @@ -0,0 +1,79 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.impl.protocol.jabber; + +import java.util.*; + +/** + * The Jabber implementation of the Volatile ContactGroup interface. + * + * @author Damian Minkov + */ +public class VolatileContactGroupJabberImpl + extends ContactGroupJabberImpl +{ + /** + * This contact group name + */ + private String contactGroupName = null; + + /** + * Creates an Jabber group using the specified group name + * @param groupName String groupname + * @param ssclCallback a callback to the server stored contact list + * we're creating. + */ + VolatileContactGroupJabberImpl( + String groupName, + ServerStoredContactListJabberImpl ssclCallback) + { + super(null, new Vector().iterator(), ssclCallback, false); + this.contactGroupName = groupName; + } + + /** + * Returns the name of this group. + * @return a String containing the name of this group. + */ + public String getGroupName() + { + return contactGroupName; + } + + /** + * Returns a string representation of this group, in the form + * JabberGroup.GroupName[size]{ buddy1.toString(), buddy2.toString(), ...}. + * @return a String representation of the object. + */ + public String toString() + { + StringBuffer buff = new StringBuffer("VolatileJabberGroup."); + buff.append(getGroupName()); + buff.append(", childContacts="+countContacts()+":["); + + Iterator contacts = contacts(); + while (contacts.hasNext()) + { + ContactJabberImpl contact = (ContactJabberImpl) contacts.next(); + buff.append(contact.toString()); + if(contacts.hasNext()) + buff.append(", "); + } + return buff.append("]").toString(); + } + + /** + * Determines whether or not this contact group is being stored by the + * server. Non persistent contact groups exist for the sole purpose of + * containing non persistent contacts. + * @return true if the contact group is persistent and false otherwise. + */ + public boolean isPersistent() + { + return false; + } +} |