Packageorg.igniterealtime.xiff.data.forms
Classpublic class FormExtension
InheritanceFormExtension Inheritance Extension Inheritance XMLStanza Inheritance ExtensionContainer
ImplementsIExtension

Implements the base functionality shared by all MUC extensions

See also

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


Public Properties
 PropertyDefined by
 Inherited_exts : Object
ExtensionContainer
  instructions : String
Instructions describing what to do with this form
FormExtension
  title : String
The title of this form
FormExtension
  type : String
The type of form.
FormExtension
 InheritedXMLData : XML
[static]
XMLStanza
 InheritedXMLFactory : XMLDocument
[static]
XMLStanza
Public Methods
 MethodDefined by
  
FormExtension(parent:XMLNode = null)
FormExtension
 Inherited
ExtensionContainer
 Inherited
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
XMLStanza
  
deserialize(node:XMLNode):Boolean
FormExtension
  
enable():Boolean
[static]
FormExtension
 Inherited
ensureNode(node:XMLNode, elementName:String):XMLNode
Ensures that a node with a specific element name exists in the stanza.
XMLStanza
 Inherited
exists(value:*):Boolean
[static] A helper method to determine if a value is both not null and not undefined.
XMLStanza
 Inherited
ExtensionContainer
 Inherited
getAllExtensionsByNS(ns:String):Array
ExtensionContainer
  
getAllFields():Array
Item interface to array of fields if they are contained in an "item" element
FormExtension
  
getAllItems():Array
Item interface to array of fields if they are contained in an "item" element
FormExtension
  
getElementName():String
FormExtension
 Inherited
getExtension(name:String):Extension
ExtensionContainer
  
getFormField(value:String):FormField
FormExtension
  
getFormType():String
This is an accessor to the hidden field type FORM_TYPE easily check what kind of form this is.
FormExtension
 Inherited
getNode():XMLNode
XMLStanza
  
getNS():String
FormExtension
  
Array of fields found in individual items due to a search query result
FormExtension
 Inherited
remove():void
Removes the extension from its parent.
Extension
 Inherited
removeAllExtensions(ns:String):void
ExtensionContainer
  
Use this method to remove all fields.
FormExtension
  
Use this method to remove all items.
FormExtension
 Inherited
ExtensionContainer
 Inherited
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
Called when this extension is being put back on the network.
FormExtension
  
setFields(fieldmap:Object):void
Sets the fields given a fieldmap object containing keys of field names and values of value arrays
FormExtension
 Inherited
setNode(node:XMLNode):Boolean
Sets the XML node that should be used for this stanza's internal XML representation.
XMLStanza
 Inherited
toString():String
Converts the extension stanza XML to a string.
Extension
Public Constants
 ConstantDefined by
  ELEMENT_NAME : String = "x"
[static]
FormExtension
  FIELD_TYPE_BOOLEAN : String = "boolean"
[static]
FormExtension
  FIELD_TYPE_FIXED : String = "fixed"
[static]
FormExtension
  FIELD_TYPE_HIDDEN : String = "hidden"
[static]
FormExtension
  FIELD_TYPE_JID_MULTI : String = "jid-multi"
[static]
FormExtension
  FIELD_TYPE_JID_SINGLE : String = "jid-single"
[static]
FormExtension
  FIELD_TYPE_LIST_MULTI : String = "list-multi"
[static]
FormExtension
  FIELD_TYPE_LIST_SINGLE : String = "list-single"
[static]
FormExtension
  FIELD_TYPE_TEXT_MULTI : String = "text-multi"
[static]
FormExtension
  FIELD_TYPE_TEXT_PRIVATE : String = "text-private"
[static]
FormExtension
  FIELD_TYPE_TEXT_SINGLE : String = "text-single"
[static]
FormExtension
  NS : String = "jabber:x:data"
[static]
FormExtension
  TYPE_CANCEL : String = "cancel"
[static]
FormExtension
  TYPE_REQUEST : String = "form"
[static]
FormExtension
  TYPE_RESULT : String = "result"
[static]
FormExtension
  TYPE_SUBMIT : String = "submit"
[static]
FormExtension
Property detail
instructionsproperty
instructions:String  [read-write]

Instructions describing what to do with this form

Implementation
    public function get instructions():String
    public function set instructions(value:String):void
titleproperty 
title:String  [read-write]

The title of this form

Implementation
    public function get title():String
    public function set title(value:String):void
typeproperty 
type:String  [read-write]

The type of form. May be one of the following: FormExtension.TYPE_REQUEST FormExtension.TYPE_RESULT FormExtension.TYPE_SUBMIT FormExtension.TYPE_CANCEL

Implementation
    public function get type():String
    public function set type(value:String):void
Constructor detail
FormExtension()constructor
public function FormExtension(parent:XMLNode = null)

Parameters
parent:XMLNode (default = null) — (Optional) The containing XMLNode for this extension
Method detail
deserialize()method
public function deserialize(node:XMLNode):BooleanParameters
node:XMLNode

Returns
Boolean
enable()method 
public static function enable():Boolean

Returns
Boolean
getAllFields()method 
public function getAllFields():Array

Item interface to array of fields if they are contained in an "item" element

Returns
Array — Array of FormFields objects
getAllItems()method 
public function getAllItems():Array

Item interface to array of fields if they are contained in an "item" element

Returns
Array — Array containing Arrays of FormFields objects
getElementName()method 
public function getElementName():String

Returns
String
getFormField()method 
public function getFormField(value:String):FormField

Parameters
value:String — the name of the form field to retrieve

Returns
FormField — FormField the matching form field
getFormType()method 
public function getFormType():String

This is an accessor to the hidden field type FORM_TYPE easily check what kind of form this is.

Returns
String — String the registered namespace of this form type

See also

getNS()method 
public function getNS():String

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

Array of fields found in individual items due to a search query result

Returns
Array — Array of FormField objects containing information about the fields in the fields retrieved by getAllItems
removeAllFields()method 
public function removeAllFields():void

Use this method to remove all fields.

removeAllItems()method 
public function removeAllItems():void

Use this method to remove all items.

serialize()method 
public function serialize(parent:XMLNode):Boolean

Called when this extension is being put back on the network. Perform any further serialization for Extensions and items

Parameters
parent:XMLNode

Returns
Boolean
setFields()method 
public function setFields(fieldmap:Object):void

Sets the fields given a fieldmap object containing keys of field names and values of value arrays

Parameters
fieldmap:Object — Object in format obj[key:String].value:Array
Constant detail
ELEMENT_NAMEconstant
public static const ELEMENT_NAME:String = "x"
FIELD_TYPE_BOOLEANconstant 
public static const FIELD_TYPE_BOOLEAN:String = "boolean"
FIELD_TYPE_FIXEDconstant 
public static const FIELD_TYPE_FIXED:String = "fixed"
FIELD_TYPE_HIDDENconstant 
public static const FIELD_TYPE_HIDDEN:String = "hidden"
FIELD_TYPE_JID_MULTIconstant 
public static const FIELD_TYPE_JID_MULTI:String = "jid-multi"
FIELD_TYPE_JID_SINGLEconstant 
public static const FIELD_TYPE_JID_SINGLE:String = "jid-single"
FIELD_TYPE_LIST_MULTIconstant 
public static const FIELD_TYPE_LIST_MULTI:String = "list-multi"
FIELD_TYPE_LIST_SINGLEconstant 
public static const FIELD_TYPE_LIST_SINGLE:String = "list-single"
FIELD_TYPE_TEXT_MULTIconstant 
public static const FIELD_TYPE_TEXT_MULTI:String = "text-multi"
FIELD_TYPE_TEXT_PRIVATEconstant 
public static const FIELD_TYPE_TEXT_PRIVATE:String = "text-private"
FIELD_TYPE_TEXT_SINGLEconstant 
public static const FIELD_TYPE_TEXT_SINGLE:String = "text-single"
NSconstant 
public static const NS:String = "jabber:x:data"
TYPE_CANCELconstant 
public static const TYPE_CANCEL:String = "cancel"
TYPE_REQUESTconstant 
public static const TYPE_REQUEST:String = "form"
TYPE_RESULTconstant 
public static const TYPE_RESULT:String = "result"
TYPE_SUBMITconstant 
public static const TYPE_SUBMIT:String = "submit"