Packageorg.igniterealtime.xiff.data.search
Classpublic class SearchExtension
InheritanceSearchExtension Inheritance Extension Inheritance XMLStanza Inheritance ExtensionContainer Inheritance Object
Implements IExtension

XEP-0055: Jabber Search

Implements jabber:iq:search namespace. Use this to perform user searches.

Send an empty IQ.TYPE_GET packet with this extension and the return will either be a conflict, or the fields you will need to fill out.

Send a IQ.TYPE_SET packet to the server and with the fields that are listed in getRequiredFieldNames set on this extension.

Check the result and re-establish the connection with the new account.

See also

http://xmpp.org/extensions/xep-0055.html


Public Properties
 PropertyDefined By
  fields : Array
[write-only]
SearchExtension
  instructions : String
Use null to remove.
SearchExtension
  items : Array
[read-only] List of SearchItem in this query.
SearchExtension
  xml : XML
[override]
SearchExtension
Public Methods
 MethodDefined By
  
SearchExtension(parent:XML = null)
SearchExtension
 Inherited
Add extension to the list of the given namespace and insert to the XML element as a child.
ExtensionContainer
 Inherited
ExtensionContainer
 Inherited
getAllExtensionsByNS(nameSpace:String):Array
ExtensionContainer
 Inherited
getAttribute(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
 Inherited
getChildAttribute(elem:String, name:String):String
Convinience method for getting child element attribute value from the XML.
XMLStanza
 Inherited
getChildField(elem:String, name:String):String
Convinience method for getting child element value from the XML.
XMLStanza
  
SearchExtension
 Inherited
getExtension(elementName:String):IExtension
Get the extension having the given element name.
ExtensionContainer
 Inherited
getField(name:String):String
Convinience method for getting element value from the XML.
XMLStanza
  
getNS():String
SearchExtension
  
TODO rename to getter
SearchExtension
 Inherited
remove():void
Removes the extension from its parent.
Extension
 Inherited
removeAllExtensions(nameSpace:String):void
ExtensionContainer
 Inherited
removeExtension(extension:IExtension):Boolean
ExtensionContainer
 Inherited
removeFields(name:String):void
Helper method for removing all child elements that have the given name.
XMLStanza
 Inherited
setAttribute(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
setChildAttribute(elem:String, name:String, value:String):void
Convinience method for setting an attribute for a child element of the XML.
XMLStanza
 Inherited
setChildField(elem:String, name:String, value:String):void
Convinience method for setting a value for a child element of the XML.
XMLStanza
 Inherited
setField(name:String, value:String):void
Convinience method for setting a value to a element in the XML.
XMLStanza
 Inherited
toString():String
Converts the base stanza XML to a string.
XMLStanza
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NS : Namespace
[static] Default XML namespace.
XMLStanza
  ELEMENT_NAME : String = query
[static]
SearchExtension
 InheritedFLASH_NS : Namespace
[static]
XMLStanza
  NS : String = jabber:iq:search
[static]
SearchExtension
 InheritedSTREAM_NS : Namespace
[static]
XMLStanza
Property Detail
fieldsproperty
fields:Array  [write-only]


Implementation
    public function set fields(value:Array):void
instructionsproperty 
instructions:String

Use null to remove.


Implementation
    public function get instructions():String
    public function set instructions(value:String):void
itemsproperty 
items:Array  [read-only]

List of SearchItem in this query.


Implementation
    public function get items():Array
xmlproperty 
xml:XML[override]


Implementation
    public function get xml():XML
    public function set xml(value:XML):void
Constructor Detail
SearchExtension()Constructor
public function SearchExtension(parent:XML = null)

Parameters
parent:XML (default = null) — (Optional) The parent node used to build the XML tree.
Method Detail
getElementName()method
public function getElementName():String

Returns
String
getNS()method 
public function getNS():String

Returns
String
getRequiredFieldNames()method 
public function getRequiredFieldNames():Array

TODO rename to getter

Returns
Array
Constant Detail
ELEMENT_NAMEConstant
public static const ELEMENT_NAME:String = query

NSConstant 
public static const NS:String = jabber:iq:search