public class JabberDataElement extends ElementWrapper
| Constructor and Description |
|---|
JabberDataElement(Element x)
Creates instance of JabberDataElement and parse fields.
|
JabberDataElement(XDataType type)
Creates empty form instance.
|
| Modifier and Type | Method and Description |
|---|---|
BooleanField |
addBooleanField(String var,
Boolean value)
Adds boolean field to form.
|
protected void |
addField(AbstractField<?> f) |
FixedField |
addFixedField(String value)
Adds fixed field to form.
|
FixedField |
addFixedField(String var,
String value)
Adds fixed field to form.
|
void |
addFORM_TYPE(String value)
Adds field "FORM_TYPE" hidded field to form.
|
HiddenField |
addHiddenField(String var,
String value)
Adds hidden field to form.
|
JidMultiField |
addJidMultiField(String var,
JID... value)
Adds jid-multi field to form.
|
JidSingleField |
addJidSingleField(String var,
JID value)
Adds jid-single field to form.
|
ListMultiField |
addListMultiField(String var,
String... value)
Adds list-multi field to form.
|
ListSingleField |
addListSingleField(String var,
String value)
Adds list-single field to form.
|
TextMultiField |
addTextMultiField(String var,
String... value)
Adds text-multi field to form.
|
TextPrivateField |
addTextPrivateField(String var,
String value)
Adds text-private field to form.
|
TextSingleField |
addTextSingleField(String var,
String value)
Adds text-single field to form.
|
Element |
createSubmitableElement(XDataType type)
Creates XML Element contains only values of fields.
|
<X extends AbstractField<?>> |
getField(String var)
Returns field with given name.
|
ArrayList<AbstractField<?>> |
getFields()
Returns all fields of form.
|
String |
getInstructions()
Returns natural language instruction.
|
String |
getTitle()
Returns title.
|
XDataType |
getType()
Return data type.
|
void |
setInstructions(String instructions)
Sets natural-language instruction.
|
void |
setTitle(String title)
Sets form title.
|
addChild, equals, findChild, getAsString, getAttribute, getAttributes, getChildAfter, getChildElementValue, getChildElementValue, getChildren, getChildren, getChildrenNS, getChildrenNS, getFirstChild, getFirstChild, getName, getNextSibling, getParent, getValue, getWrappedElement, getXMLNS, hashCode, removeAttribute, removeChild, setAttribute, setAttributes, setChildElementValue, setChildElementValue, setParent, setValue, setXMLNSpublic JabberDataElement(Element x) throws JaxmppException
x - <x xmlns='jabber:x:data'/> element.JaxmppExceptionpublic JabberDataElement(XDataType type) throws XMLException
type - type of data.XMLExceptionpublic final BooleanField addBooleanField(String var, Boolean value) throws XMLException
var - name of fieldvalue - value of fieldXMLExceptionprotected void addField(AbstractField<?> f) throws XMLException
XMLExceptionpublic final FixedField addFixedField(String value) throws XMLException
value - value of fieldXMLExceptionpublic final FixedField addFixedField(String var, String value) throws XMLException
value - value of fieldXMLExceptionpublic void addFORM_TYPE(String value) throws XMLException
value - value of fieldXMLExceptionpublic final HiddenField addHiddenField(String var, String value) throws XMLException
var - name of fieldvalue - value of fieldXMLExceptionpublic final JidMultiField addJidMultiField(String var, JID... value) throws XMLException
var - name of fieldvalue - values of fieldXMLExceptionpublic final JidSingleField addJidSingleField(String var, JID value) throws XMLException
var - name of fieldvalue - value of fieldXMLExceptionpublic final ListMultiField addListMultiField(String var, String... value) throws XMLException
var - name of fieldvalue - values of fieldXMLExceptionpublic final ListSingleField addListSingleField(String var, String value) throws XMLException
var - name of field.value - value of fieldXMLExceptionpublic final TextMultiField addTextMultiField(String var, String... value) throws XMLException
var - name of fieldvalue - values of fieldXMLExceptionpublic final TextPrivateField addTextPrivateField(String var, String value) throws XMLException
var - name of field.value - value of fieldTextPrivateFieldXMLExceptionpublic final TextSingleField addTextSingleField(String var, String value) throws XMLException
var - name of field.value - value od field.XMLExceptionpublic Element createSubmitableElement(XDataType type) throws JaxmppException
type - data typeJaxmppExceptionpublic <X extends AbstractField<?>> X getField(String var)
var - name of fieldnull is field with given name doesn't
exists in form.public ArrayList<AbstractField<?>> getFields()
public String getInstructions() throws XMLException
XMLExceptionpublic String getTitle() throws XMLException
XMLExceptionpublic XDataType getType() throws XMLException
XMLExceptionpublic void setInstructions(String instructions) throws XMLException
instructions - instruction.XMLExceptionpublic void setTitle(String title) throws XMLException
title - titleXMLExceptionCopyright © 2006–2015 Tigase. All rights reserved.