Package | org.igniterealtime.xiff.data.im |
Class | public class RosterExtension |
Inheritance | RosterExtension ![]() ![]() ![]() |
Implements | IExtension |
Method | Defined by | ||
---|---|---|---|
RosterExtension(parent:XMLNode = null)
| RosterExtension | ||
![]() | ExtensionContainer | ||
addItem(jid:EscapedJID = null, subscription:String = "", displayName:String = "", groups:Array = null):void
Adds a single roster item to the extension payload.
| RosterExtension | ||
![]() |
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
| XMLStanza | |
deserialize(node:XMLNode):Boolean
Deserializes the RosterExtension data.
| RosterExtension | ||
enable():void
[static]
Performs the registration of this extension into the extension registry.
| RosterExtension | ||
![]() |
ensureNode(node:XMLNode, elementName:String):XMLNode
Ensures that a node with a specific element name exists in the stanza.
| XMLStanza | |
![]() |
exists(value:*):Boolean
[static]
A helper method to determine if a value is both not null
and not undefined.
| XMLStanza | |
![]() |
getAllExtensions():Array
| ExtensionContainer | |
![]() |
getAllExtensionsByNS(ns:String):Array
| ExtensionContainer | |
getAllItems():Array
Get all the items from this roster query.
| RosterExtension | ||
getElementName():String
Gets the element name associated with this extension.
| RosterExtension | ||
![]() |
getExtension(name:String):Extension
| ExtensionContainer | |
Gets one item from the roster query, returning the first item found with the JID specified.
| RosterExtension | ||
![]() |
getNode():XMLNode
| XMLStanza | |
getNS():String
Gets the namespace associated with this extension.
| RosterExtension | ||
![]() |
remove():void
Removes the extension from its parent.
| Extension | |
![]() |
removeAllExtensions(ns:String):void
| ExtensionContainer | |
removeAllItems():void
Removes all items from the roster data.
| RosterExtension | ||
![]() |
removeExtension(ext:IExtension):Boolean
| ExtensionContainer | |
![]() |
replaceTextNode(parent:XMLNode, original:XMLNode, elementName:String, value:String):XMLNode
Replaces one node in the stanza with another simple text node.
| XMLStanza | |
serialize(parent:XMLNode):Boolean
Serializes the RosterExtension data to XML for sending.
| RosterExtension | ||
![]() |
setNode(node:XMLNode):Boolean
Sets the XML node that should be used for this stanza's internal XML representation.
| XMLStanza | |
![]() |
toString():String
Converts the extension stanza XML to a string.
| Extension |
Constant | Defined by | ||
---|---|---|---|
ASK_TYPE_NONE : String = "none" [static]
| RosterExtension | ||
ASK_TYPE_SUBSCRIBE : String = "subscribe" [static]
| RosterExtension | ||
ASK_TYPE_UNSUBSCRIBE : String = "unsubscribe" [static]
| RosterExtension | ||
ELEMENT_NAME : String = "query" [static]
| RosterExtension | ||
NS : String = "jabber:iq:roster" [static]
| RosterExtension | ||
SHOW_PENDING : String = "Pending" [static]
| RosterExtension | ||
SHOW_UNAVAILABLE : String = "unavailable" [static]
| RosterExtension | ||
SUBSCRIBE_TYPE_BOTH : String = "both" [static]
| RosterExtension | ||
SUBSCRIBE_TYPE_FROM : String = "from" [static]
| RosterExtension | ||
SUBSCRIBE_TYPE_NONE : String = "none" [static]
| RosterExtension | ||
SUBSCRIBE_TYPE_REMOVE : String = "remove" [static]
| RosterExtension | ||
SUBSCRIBE_TYPE_TO : String = "to" [static]
| RosterExtension |
RosterExtension | () | constructor |
public function RosterExtension(parent:XMLNode = null)
Parameters
parent:XMLNode (default = null )
|
addItem | () | method |
public function addItem(jid:EscapedJID = null, subscription:String = "", displayName:String = "", groups:Array = null):void
Adds a single roster item to the extension payload.
Parametersjid:EscapedJID (default = null ) — The JID of the contact to add
|
|
subscription:String (default = " ") — The subscription type of the roster item contact. There are pre-defined static variables for these string options in this class definition.
|
|
displayName:String (default = " ") — The display name or nickname of the contact.
|
|
groups:Array (default = null ) — An array of strings of the group names that this contact should be placed in.
|
deserialize | () | method |
public function deserialize(node:XMLNode):Boolean
Deserializes the RosterExtension data.
Parametersnode:XMLNode — The XML node associated this data
|
Boolean — An indicator as to whether deserialization was successful
|
enable | () | method |
public static function enable():void
Performs the registration of this extension into the extension registry.
getAllItems | () | method |
public function getAllItems():Array
Get all the items from this roster query.
ReturnsArray — An array of roster items.
|
getElementName | () | method |
public function getElementName():String
Gets the element name associated with this extension. The element for this extension is "query".
ReturnsString — The element name
|
getItemByJID | () | method |
public function getItemByJID(jid:EscapedJID):RosterItem
Gets one item from the roster query, returning the first item found with the JID specified. If none is found, then it returns null.
Parametersjid:EscapedJID |
RosterItem —
A roster item object with the following attributes: "jid", "subscription", "displayName", and "groups".
|
getNS | () | method |
public function getNS():String
Gets the namespace associated with this extension. The namespace for the RosterExtension is "jabber:iq:roster".
ReturnsString — The namespace
|
removeAllItems | () | method |
public function removeAllItems():void
Removes all items from the roster data.
serialize | () | method |
public function serialize(parent:XMLNode):Boolean
Serializes the RosterExtension data to XML for sending.
Parametersparent:XMLNode — The parent node that this extension should be serialized into
|
Boolean — An indicator as to whether serialization was successful
|
ASK_TYPE_NONE | constant |
public static const ASK_TYPE_NONE:String = "none"
ASK_TYPE_SUBSCRIBE | constant |
public static const ASK_TYPE_SUBSCRIBE:String = "subscribe"
ASK_TYPE_UNSUBSCRIBE | constant |
public static const ASK_TYPE_UNSUBSCRIBE:String = "unsubscribe"
ELEMENT_NAME | constant |
public static const ELEMENT_NAME:String = "query"
NS | constant |
public static const NS:String = "jabber:iq:roster"
SHOW_PENDING | constant |
public static const SHOW_PENDING:String = "Pending"
SHOW_UNAVAILABLE | constant |
public static const SHOW_UNAVAILABLE:String = "unavailable"
SUBSCRIBE_TYPE_BOTH | constant |
public static const SUBSCRIBE_TYPE_BOTH:String = "both"
SUBSCRIBE_TYPE_FROM | constant |
public static const SUBSCRIBE_TYPE_FROM:String = "from"
SUBSCRIBE_TYPE_NONE | constant |
public static const SUBSCRIBE_TYPE_NONE:String = "none"
SUBSCRIBE_TYPE_REMOVE | constant |
public static const SUBSCRIBE_TYPE_REMOVE:String = "remove"
SUBSCRIBE_TYPE_TO | constant |
public static const SUBSCRIBE_TYPE_TO:String = "to"