public class DataForm extends java.lang.Object implements PacketExtension
Modifier and Type | Class and Description |
---|---|
static class |
DataForm.Item
Represents items of reported data.
|
static class |
DataForm.ReportedData
Represents the fields that will be returned from a search.
|
Constructor and Description |
---|
DataForm(java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
void |
addField(FormField field)
Adds a new field as part of the form.
|
void |
addInstruction(java.lang.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.
|
java.lang.String |
getElementName()
Returns the root element name.
|
java.util.Iterator |
getFields()
Returns an Iterator for the fields that are part of the form.
|
java.util.Iterator |
getInstructions()
Returns an Iterator for the list of instructions that explain how to fill out the form and
what the form is about.
|
java.util.Iterator |
getItems()
Returns an Iterator for the items returned from a search.
|
java.lang.String |
getNamespace()
Returns the root element XML namespace.
|
DataForm.ReportedData |
getReportedData()
Returns the fields that will be returned from a search.
|
java.lang.String |
getTitle()
Returns the description of the data.
|
java.lang.String |
getType()
Returns the meaning of the data within the context.
|
void |
setInstructions(java.util.List 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(java.lang.String title)
Sets the description of the data.
|
java.lang.String |
toXML()
Returns the XML reppresentation of the PacketExtension.
|
public java.lang.String getType()
Possible form types are:
public java.lang.String getTitle()
public java.util.Iterator getInstructions()
public DataForm.ReportedData getReportedData()
public java.util.Iterator getItems()
public java.util.Iterator getFields()
public java.lang.String getElementName()
PacketExtension
getElementName
in interface PacketExtension
public java.lang.String getNamespace()
PacketExtension
getNamespace
in interface PacketExtension
public void setTitle(java.lang.String title)
title
- description of the data.public void setInstructions(java.util.List 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(java.lang.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 java.lang.String toXML()
PacketExtension
toXML
in interface PacketExtension
Copyright © 2003 Jive Software.