|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smackx.packet.DataForm
public class DataForm
Represents a form that could be use for gathering data as well as for reporting data returned from a search.
| Nested Class Summary | |
|---|---|
static class |
DataForm.Item
Represents items of reported data. |
static class |
DataForm.ReportedData
Represents the fields that will be returned from a search. |
| Constructor Summary | |
|---|---|
DataForm(String type)
|
|
| Method Summary | |
|---|---|
void |
addField(FormField field)
Adds a new field as part of the form. |
void |
addInstruction(String instruction)
Adds a new instruction to the list of instructions that explain how to fill out the form and what the form is about. |
void |
addItem(DataForm.Item item)
Adds a new item returned from a search. |
String |
getElementName()
Returns the root element name. |
Iterator<FormField> |
getFields()
Returns an Iterator for the fields that are part of the form. |
Iterator<String> |
getInstructions()
Returns an Iterator for the list of instructions that explain how to fill out the form and what the form is about. |
Iterator<DataForm.Item> |
getItems()
Returns an Iterator for the items returned from a search. |
String |
getNamespace()
Returns the root element XML namespace. |
DataForm.ReportedData |
getReportedData()
Returns the fields that will be returned from a search. |
String |
getTitle()
Returns the description of the data. |
String |
getType()
Returns the meaning of the data within the context. |
void |
setInstructions(List<String> instructions)
Sets the list of instructions that explain how to fill out the form and what the form is about. |
void |
setReportedData(DataForm.ReportedData reportedData)
Sets the fields that will be returned from a search. |
void |
setTitle(String title)
Sets the description of the data. |
String |
toXML()
Returns the XML representation of the PacketExtension. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataForm(String type)
| Method Detail |
|---|
public String getType()
Possible form types are:
public String getTitle()
public Iterator<String> getInstructions()
public DataForm.ReportedData getReportedData()
public Iterator<DataForm.Item> getItems()
public Iterator<FormField> getFields()
public String getElementName()
PacketExtension
getElementName in interface PacketExtensionpublic String getNamespace()
PacketExtension
getNamespace in interface PacketExtensionpublic void setTitle(String title)
title - description of the data.public void setInstructions(List<String> instructions)
instructions - list of instructions that explain how to fill out the form.public void setReportedData(DataForm.ReportedData reportedData)
reportedData - the fields that will be returned from a search.public void addField(FormField field)
field - the field to add to the form.public void addInstruction(String instruction)
instruction - the new instruction that explain how to fill out the form.public void addItem(DataForm.Item item)
item - the item returned from a search.public String toXML()
PacketExtension
toXML in interface PacketExtension
|
Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||