org.jabber.jabberbeans
Class RosterItem

java.lang.Object
  |
  +--org.jabber.jabberbeans.XMLData
        |
        +--org.jabber.jabberbeans.RosterItem
All Implemented Interfaces:
java.io.Serializable

public class RosterItem
extends XMLData

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

See Also:
Serializable, Serialized Form

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, wait, wait, wait
 

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.

Specified by:
appendItem in class XMLData
Parameters:
sb - The StringBuffer to append to
Returns:
StringBuffer with XML