Package org.jivesoftware.smackx.xdata
Class FormField.Builder<F extends FormField,B extends FormField.Builder<?,?>>
java.lang.Object
org.jivesoftware.smackx.xdata.FormField.Builder<F,B>
- Direct Known Subclasses:
AbstractMultiFormField.Builder
,JidMultiFormField.Builder
,SingleValueFormField.Builder
- Enclosing class:
- FormField
public abstract static class FormField.Builder<F extends FormField,B extends FormField.Builder<?,?>>
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddFormFieldChildElement
(FormFieldChildElement newFormFieldChildElement) addFormFieldChildElements
(Collection<? extends FormFieldChildElement> formFieldChildElements) abstract F
build()
abstract B
getThis()
getType()
reset()
protected abstract void
setDescription
(String description) Sets a description that provides extra clarification about the question.Sets the label of the question which should give enough information to the user to fill out the form.Sets if the question must be answered in order to complete the questionnaire.setRequired
(boolean required) Sets if the question must be answered in order to complete the questionnaire.
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
setDescription
Sets a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.If the question is of type FIXED then the description should remain empty.
- Parameters:
description
- provides extra clarification about the question.- Returns:
- a reference to this builder.
-
setLabel
Sets the label of the question which should give enough information to the user to fill out the form.- Parameters:
label
- the label of the question.- Returns:
- a reference to this builder.
-
setRequired
Sets if the question must be answered in order to complete the questionnaire.- Returns:
- a reference to this builder.
-
setRequired
Sets if the question must be answered in order to complete the questionnaire.- Parameters:
required
- if the question must be answered in order to complete the questionnaire.- Returns:
- a reference to this builder.
-
addFormFieldChildElements
public B addFormFieldChildElements(Collection<? extends FormFieldChildElement> formFieldChildElements) -
addFormFieldChildElement
-
resetInternal
-
reset
-
build
-
getType
-
getThis
-