org.jabber.jabberbeans
Class RosterItem

java.lang.Object
  |
  +--org.jabber.jabberbeans.XMLData
        |
        +--org.jabber.jabberbeans.RosterItem

public class RosterItem
extends XMLData

A RosterItem is a single user item in Jabber. A roster item contains the following information:

Version:
$Revision: 1.1.1.1 $
Author:
David Waite <dwaite@jabber.com>, $Author: lucky $
See Also:
Serializable, Serialized Form

Field Summary
private  java.lang.String askStateType
          The Asking State as described above
private  java.lang.String friendlyName
          The 'Friendly Name' as described above
private  java.util.Vector groups
          A vector of groups associated with this item, as described above
private  JID jid
          The JID as described above
private  java.lang.String subscriptionType
          The Subscription Type as described above
 
Constructor Summary
RosterItem(RosterItemBuilder builder)
          Creates a new RosterItem instance based on the builder being passed in
 
Method Summary
 void appendItem(java.lang.StringBuffer sb)
          appendItem outputs an XML-style representation of the current roster item, appending it to a Stringbuffer.
 java.util.Enumeration enumerateGroups()
          enumerateGroups enumerates the group(s) which the user is entered.
 java.lang.String getFriendlyName()
          getFriendlyName returns the 'friendly name' associated with this roster item
 JID getJID()
          getJID gets the JID contained in this roster element
 java.lang.String getSubscriptionType()
          getSubscriptionType gets the subscription type of this roster element
 java.lang.String getWaitingStateType()
          getWaitingStateType returns a state that you are waiting for, such as 'subscribe' (waiting for other user to approve your subscription).
 
Methods inherited from class org.jabber.jabberbeans.XMLData
appendAttrib, appendAttrib, appendChild, appendChild, escapeString, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

jid

private JID jid
The JID as described above

subscriptionType

private java.lang.String subscriptionType
The Subscription Type as described above

askStateType

private java.lang.String askStateType
The Asking State as described above

friendlyName

private java.lang.String friendlyName
The 'Friendly Name' as described above

groups

private java.util.Vector groups
A vector of groups associated with this item, as described above
Constructor Detail

RosterItem

public RosterItem(RosterItemBuilder builder)
           throws java.lang.InstantiationException
Creates a new RosterItem instance based on the builder being passed in
Parameters:
builder - a valid RosterItemBuilder
Throws:
java.lang.InstantiationException - if an error occurs
Method Detail

getJID

public JID getJID()
getJID gets the JID contained in this roster element
Returns:
a JID value

getSubscriptionType

public java.lang.String getSubscriptionType()
getSubscriptionType gets the subscription type of this roster element
Returns:
String holding subscription type, or null if none specified.

getWaitingStateType

public java.lang.String getWaitingStateType()
getWaitingStateType returns a state that you are waiting for, such as 'subscribe' (waiting for other user to approve your subscription). This value is not directly changable by clients.
Returns:
a String value, with null representing 'none'.

getFriendlyName

public java.lang.String getFriendlyName()
getFriendlyName returns the 'friendly name' associated with this roster item
Returns:
a String value, or null if no friendly name was specified

enumerateGroups

public java.util.Enumeration enumerateGroups()
enumerateGroups enumerates the group(s) which the user is entered. If no groups are specified or an 'empty' group is specified, the user is on the top level.
Returns:
an Enumeration value

appendItem

public void appendItem(java.lang.StringBuffer sb)
appendItem outputs an XML-style representation of the current roster item, appending it to a Stringbuffer.
Overrides:
appendItem in class XMLData
Returns:
StringBuffer with XML