public static final class DataForm.Builder
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
DataForm.Builder |
addExtensionElement(org.jivesoftware.smack.packet.Element element) |
DataForm.Builder |
addField(FormField field)
Adds a new field as part of the form.
|
DataForm.Builder |
addFields(java.util.Collection<? extends FormField> fieldsToAdd)
Add the given fields to this form.
|
DataForm.Builder |
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.
|
DataForm.Builder |
addItem(DataForm.Item item)
Adds a new item returned from a search.
|
DataForm |
build() |
DataForm.Builder |
removeField(java.lang.String fieldName) |
DataForm.Builder |
setFormType(java.lang.String formType) |
DataForm.Builder |
setInstructions(java.util.List<java.lang.String> instructions)
Sets the list of instructions that explain how to fill out the form and what the form is
about.
|
DataForm.Builder |
setInstructions(java.lang.String instructions) |
DataForm.Builder |
setReportedData(DataForm.ReportedData reportedData)
Sets the fields that will be returned from a search.
|
DataForm.Builder |
setTitle(java.lang.String title)
Sets the description of the data.
|
DataForm.Builder |
setType(DataForm.Type type)
Deprecated.
use
DataForm.builder(Type) instead. |
@Deprecated public DataForm.Builder setType(DataForm.Type type)
DataForm.builder(Type) instead.type - the type.public DataForm.Builder setTitle(java.lang.String title)
title - description of the data.public DataForm.Builder addField(FormField field)
field - the field to add to the form.public DataForm.Builder addFields(java.util.Collection<? extends FormField> fieldsToAdd)
fieldsToAdd - TODO javadoc me pleasepublic DataForm.Builder removeField(java.lang.String fieldName)
public DataForm.Builder setFormType(java.lang.String formType)
public DataForm.Builder setInstructions(java.lang.String instructions)
public DataForm.Builder setInstructions(java.util.List<java.lang.String> instructions)
instructions - list of instructions that explain how to fill out the form.public DataForm.Builder addInstruction(java.lang.String instruction)
instruction - the new instruction that explain how to fill out the form.public DataForm.Builder addItem(DataForm.Item item)
item - the item returned from a search.public DataForm.Builder setReportedData(DataForm.ReportedData reportedData)
reportedData - the fields that will be returned from a search.public DataForm.Builder addExtensionElement(org.jivesoftware.smack.packet.Element element)
public DataForm build()