org.jivesoftware.xiff.data.im
class RosterItem
Object
|
+--org.jivesoftware.xiff.data.XMLStanza
|
+--org.jivesoftware.xiff.data.im.RosterItem
Implemented Interfaces: ISerializableclass RosterItem extends XMLStanza
This class is used internally by the RosterExtension class for managing items received and sent as roster data. Usually, each item in the roster represents a single contact, and this class is used to represent, abstract, and serialize/deserialize this data.
- Author:Sean Voisen
- Since:2.0.0
- See also:
Fields inherited from class org.jivesoftware.xiff.data.XMLStanza
Property Summary
The JID for this roster item.
The display name for this roster item.
The subscription type for this roster item. Subscription types have been enumerated by static variables in the RosterExtension:
- RosterExtension.SUBSCRIBE_TYPE_NONE
- RosterExtension.SUBSCRIBE_TYPE_TO
- RosterExtension.SUBSCRIBE_TYPE_FROM
- RosterExtension.SUBSCRIBE_TYPE_BOTH
- RosterExtension.SUBSCRIBE_TYPE_REMOVE
Method Summary
Adds a group to the roster item. Contacts in the roster can be associated with multiple groups.
Deserializes the RosterItem data.
Gets a list of all the groups associated with this roster item.
Serializes the RosterItem data to XML for sending.
Methods inherited from class org.jivesoftware.xiff.data.XMLStanza
Field Documentation
Property Documentation
subscription
public subscription: String (read, write)
The subscription type for this roster item. Subscription types have been enumerated by static variables in the RosterExtension:
- RosterExtension.SUBSCRIBE_TYPE_NONE
- RosterExtension.SUBSCRIBE_TYPE_TO
- RosterExtension.SUBSCRIBE_TYPE_FROM
- RosterExtension.SUBSCRIBE_TYPE_BOTH
- RosterExtension.SUBSCRIBE_TYPE_REMOVE
Constructor Documentation
Method Documentation
addGroup
public function addGroup (
groupName: String): Void
Adds a group to the roster item. Contacts in the roster can be associated with multiple groups.
- Parameters:
groupName The name of the group to add
deserialize
public function deserialize (
node: XMLNode): Boolean
Deserializes the RosterItem data.
- Specified by:deserialize in interface org.jivesoftware.xiff.data.ISerializable
- Parameters:
node The XML node associated this data - Returns:An indicator as to whether deserialization was successful
getGroups
public function getGroups (
): Array
Gets a list of all the groups associated with this roster item.
- Returns:An array of strings containing the name of each group
serialize
public function serialize (
parent: XMLNode): Boolean
Serializes the RosterItem data to XML for sending.
- Specified by:serialize in interface org.jivesoftware.xiff.data.ISerializable
- Parameters:
parent The parent node that this item should be serialized into - Returns:An indicator as to whether serialization was successful
- RosterItem.as, Last Modified: 3/10/2005 10:11:30 PM