Package | org.igniterealtime.xiff.data.im |
Class | public class RosterExtension |
Inheritance | RosterExtension ![]() ![]() ![]() ![]() |
Implements | IExtension |
See also
Property | Defined By | ||
---|---|---|---|
items : Array
Array of RosterItem objects
| RosterExtension | ||
![]() | xml : XML [override]
Override in order to take care of setting the Namespace and
checking for containing extensions. | Extension |
Method | Defined By | ||
---|---|---|---|
RosterExtension(parent:XML = null) | RosterExtension | ||
![]() |
Add extension to the list of the given namespace and insert to the XML element as a child. | ExtensionContainer | |
addItem(jid:EscapedJID = null, subscription:String, nickname:String, groups:Array = null):void
Adds a single roster item to the extension payload. | RosterExtension | ||
![]() | getAllExtensions():Array | ExtensionContainer | |
![]() | getAllExtensionsByNS(nameSpace:String):Array | ExtensionContainer | |
![]() | getAttribute(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
![]() | getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML. | XMLStanza | |
![]() | getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML. | XMLStanza | |
getElementName():String
Gets the element name associated with this extension. | RosterExtension | ||
![]() | getExtension(elementName:String):IExtension
Get the extension having the given element name. | ExtensionContainer | |
![]() | getField(name:String):String
Convinience method for getting element value from the XML. | XMLStanza | |
Gets one item from the roster query, returning the first item found with the JID specified. | RosterExtension | ||
getNS():String
Gets the namespace associated with this extension. | RosterExtension | ||
![]() | remove():void
Removes the extension from its parent. | Extension | |
![]() | removeAllExtensions(nameSpace:String):void | ExtensionContainer | |
![]() | removeExtension(extension:IExtension):Boolean | ExtensionContainer | |
![]() | removeFields(name:String):void
Helper method for removing all child elements that have the given name. | XMLStanza | |
![]() | setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML. | XMLStanza | |
![]() | setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML. | XMLStanza | |
![]() | setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML. | XMLStanza | |
![]() | toString():String
Converts the base stanza XML to a string. | XMLStanza |
Constant | Defined By | ||
---|---|---|---|
ASK_TYPE_NONE : String = none [static] | RosterExtension | ||
ASK_TYPE_SUBSCRIBE : String = subscribe [static] | RosterExtension | ||
ASK_TYPE_UNSUBSCRIBE : String = unsubscribe [static] | RosterExtension | ||
![]() | DEFAULT_NS : Namespace [static]
Default XML namespace. | XMLStanza | |
ELEMENT_NAME : String = query [static] | RosterExtension | ||
![]() | FLASH_NS : Namespace [static]
| XMLStanza | |
NS : String = jabber:iq:roster [static] | RosterExtension | ||
SHOW_PENDING : String = Pending [static] | RosterExtension | ||
SHOW_UNAVAILABLE : String = unavailable [static] | RosterExtension | ||
![]() | STREAM_NS : Namespace [static]
| XMLStanza | |
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 |
items | property |
items:Array
Array of RosterItem objects
public function get items():Array
public function set items(value:Array):void
RosterExtension | () | Constructor |
public function RosterExtension(parent:XML = null)
Parameters
parent:XML (default = null )
|
addItem | () | method |
public function addItem(jid:EscapedJID = null, subscription:String, nickname:String, groups:Array = null):void
Adds a single roster item to the extension payload.
Parameters
jid:EscapedJID (default = null ) — The JID of the contact to add
| |
subscription:String — The subscription type of the roster item contact.
There are pre-defined static variables for these string options in this class definition.
| |
nickname:String — 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.
|
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.
Parameters
jid:EscapedJID |
RosterItem — A roster item object with the following attributes: "jid", "subscription", "nickname", 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
|
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