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 Details

  • Method Details

    • setDescription

      public B setDescription(String description)
      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

      public B setLabel(String label)
      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

      public B setRequired()
      Sets if the question must be answered in order to complete the questionnaire.
      Returns:
      a reference to this builder.
    • setRequired

      public B setRequired(boolean required)
      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

      public B addFormFieldChildElement(FormFieldChildElement newFormFieldChildElement)
    • resetInternal

      protected abstract void resetInternal()
    • reset

      public B reset()
    • build

      public abstract F build()
    • getType

    • getThis

      public abstract B getThis()