| Package | org.igniterealtime.xiff.data.forms |
| Class | public class FormExtension |
| Inheritance | FormExtension Extension XMLStanza ExtensionContainer |
| Implements | IExtension |
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | _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 | ||
![]() | XMLData : XML [static]
| XMLStanza | |
![]() | XMLFactory : XMLDocument [static]
| XMLStanza | |
| Method | Defined by | ||
|---|---|---|---|
|
FormExtension(parent:XMLNode = null)
| FormExtension | ||
![]() | ExtensionContainer | ||
![]() |
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 | ||
![]() |
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 | |
|
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 | ||
![]() |
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 | ||
![]() |
getNode():XMLNode
| XMLStanza | |
|
getNS():String
| FormExtension | ||
|
getReportedFields():Array
Array of fields found in individual items due to a search query result
| FormExtension | ||
![]() |
remove():void
Removes the extension from its parent.
| Extension | |
![]() |
removeAllExtensions(ns:String):void
| ExtensionContainer | |
|
removeAllFields():void
Use this method to remove all fields.
| FormExtension | ||
|
removeAllItems():void
Use this method to remove all items.
| FormExtension | ||
![]() |
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
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 | ||
![]() |
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 | ||
|---|---|---|---|
| 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 | ||
| instructions | property |
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
| title | property |
title:String [read-write]The title of this form
Implementation public function get title():String
public function set title(value:String):void
| type | property |
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
public function get type():String
public function set type(value:String):void
| FormExtension | () | constructor |
public function FormExtension(parent:XMLNode = null)Parameters
parent:XMLNode (default = null) — (Optional) The containing XMLNode for this extension
|
| deserialize | () | method |
public function deserialize(node:XMLNode):BooleanParameters
node:XMLNode |
Boolean |
| enable | () | method |
public static function enable():Boolean
Returns
Boolean |
| getAllFields | () | method |
public function getAllFields():ArrayItem interface to array of fields if they are contained in an "item" element
ReturnsArray — Array of FormFields objects
|
| getAllItems | () | method |
public function getAllItems():ArrayItem interface to array of fields if they are contained in an "item" element
ReturnsArray — Array containing Arrays of FormFields objects
|
| getElementName | () | method |
public function getElementName():String
Returns
String |
| getFormField | () | method |
public function getFormField(value:String):FormFieldParameters
value:String — the name of the form field to retrieve
|
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.
String — String the registered namespace of this form type
|
See also
| getNS | () | method |
public function getNS():String
Returns
String |
| getReportedFields | () | method |
public function getReportedFields():ArrayArray of fields found in individual items due to a search query result
ReturnsArray — Array of FormField objects containing information about the fields
in the fields retrieved by getAllItems
|
| removeAllFields | () | method |
public function removeAllFields():voidUse this method to remove all fields.
| removeAllItems | () | method |
public function removeAllItems():voidUse this method to remove all items.
| serialize | () | method |
public function serialize(parent:XMLNode):BooleanCalled when this extension is being put back on the network. Perform any further serialization for Extensions and items
Parametersparent:XMLNode |
Boolean |
| setFields | () | method |
public function setFields(fieldmap:Object):voidSets the fields given a fieldmap object containing keys of field names and values of value arrays
Parametersfieldmap:Object — Object in format obj[key:String].value:Array
|
| ELEMENT_NAME | constant |
public static const ELEMENT_NAME:String = "x"
| FIELD_TYPE_BOOLEAN | constant |
public static const FIELD_TYPE_BOOLEAN:String = "boolean"
| FIELD_TYPE_FIXED | constant |
public static const FIELD_TYPE_FIXED:String = "fixed"
| FIELD_TYPE_HIDDEN | constant |
public static const FIELD_TYPE_HIDDEN:String = "hidden"
| FIELD_TYPE_JID_MULTI | constant |
public static const FIELD_TYPE_JID_MULTI:String = "jid-multi"
| FIELD_TYPE_JID_SINGLE | constant |
public static const FIELD_TYPE_JID_SINGLE:String = "jid-single"
| FIELD_TYPE_LIST_MULTI | constant |
public static const FIELD_TYPE_LIST_MULTI:String = "list-multi"
| FIELD_TYPE_LIST_SINGLE | constant |
public static const FIELD_TYPE_LIST_SINGLE:String = "list-single"
| FIELD_TYPE_TEXT_MULTI | constant |
public static const FIELD_TYPE_TEXT_MULTI:String = "text-multi"
| FIELD_TYPE_TEXT_PRIVATE | constant |
public static const FIELD_TYPE_TEXT_PRIVATE:String = "text-private"
| FIELD_TYPE_TEXT_SINGLE | constant |
public static const FIELD_TYPE_TEXT_SINGLE:String = "text-single"
| NS | constant |
public static const NS:String = "jabber:x:data"
| TYPE_CANCEL | constant |
public static const TYPE_CANCEL:String = "cancel"
| TYPE_REQUEST | constant |
public static const TYPE_REQUEST:String = "form"
| TYPE_RESULT | constant |
public static const TYPE_RESULT:String = "result"
| TYPE_SUBMIT | constant |
public static const TYPE_SUBMIT:String = "submit"