tigase.server

## Class DataForm

- java.lang.Object
- - tigase.server.DataForm

-     public class DataForm
      extends Object

  Author:
    Wojciech Kapcia

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DataForm.Builder`
    `static class` | `DataForm.Field`
    `static class` | `DataForm.FieldType`
    `static class` | `DataForm.Item`
    `static class` | `DataForm.Reported`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FIELD_EL`
    `protected static String[]` | `FIELD_VALUE_PATH`
    `static String` | `FORM_TYPE`
    `static String` | `VALUE_EL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataForm()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addCheckBoxField(Element el, String f_name, boolean f_value)` Data form-types as defined in the XEP-0050.
    `static Element` | `addDataForm(Element el, Command.DataType data_type)`
    `static void` | `addField(Element el, String f_name, String f_label, String type)`
    `static void` | `addFieldMultiValue(Element el, String f_name, List<String> f_value)`
    `static void` | `addFieldMultiValue(Element el, String f_name, List<String> f_value, String label)`
    `static void` | `addFieldMultiValue(Element el, String f_name, Throwable ex)`
    `static void` | `addFieldValue(Element el, String f_name, String f_value)`
    `static void` | `addFieldValue(Element el, String f_name, String[] f_values, String label, String[] labels, String[] options)`
    `static void` | `addFieldValue(Element el, String f_name, String f_value, String type)`
    `static void` | `addFieldValue(Element el, String f_name, String f_value, String type, String label)`
    `static void` | `addFieldValue(Element el, String f_name, String f_value, String label, String[] labels, String[] options)`
    `static void` | `addFieldValue(Element el, String f_name, String f_value, String label, String[] labels, String[] options, String type)`
    `static void` | `addHiddenField(Element el, String f_name, String f_value)`
    `static void` | `addInstructions(Element el, String instructions)`
    `static void` | `addTextField(Element el, String f_name, String f_value)`
    `static void` | `addTitle(Element el, String title)`
    `static Element` | `createDataForm(Command.DataType data_type)`
    `static String` | `getFieldKeyStartingWith(Element el, String f_name)`
    `static Set<String>` | `getFields(Element el)`
    `static String` | `getFieldValue(Element el, String f_name)`
    `static String[]` | `getFieldValues(Element el, String f_name)`
    `static String` | `getFormType(Element form)`
    `static boolean` | `removeFieldValue(Element el, String f_name)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### FIELD_EL

          public static final String FIELD_EL

      See Also:
        Constant Field Values

    - #### VALUE_EL

          public static final String VALUE_EL

      See Also:
        Constant Field Values

    - #### FORM_TYPE

          public static final String FORM_TYPE

      See Also:
        Constant Field Values

    - #### FIELD_VALUE_PATH

          protected static final String[] FIELD_VALUE_PATH

  - ### Constructor Detail

    - #### DataForm

          public DataForm()

  - ### Method Detail

    - #### addCheckBoxField

          public static void addCheckBoxField(Element el,
                                              String f_name,
                                              boolean f_value)

      Data form-types as defined in the XEP-0050.

    - #### addDataForm

          public static Element addDataForm(Element el,
                                            Command.DataType data_type)

    - #### addField

          public static void addField(Element el,
                                      String f_name,
                                      String f_label,
                                      String type)

    - #### addFieldMultiValue

          public static void addFieldMultiValue(Element el,
                                                String f_name,
                                                List<String> f_value)

    - #### addFieldMultiValue

          public static void addFieldMultiValue(Element el,
                                                String f_name,
                                                List<String> f_value,
                                                String label)

    - #### addFieldMultiValue

          public static void addFieldMultiValue(Element el,
                                                String f_name,
                                                Throwable ex)

    - #### addFieldValue

          public static void addFieldValue(Element el,
                                           String f_name,
                                           String f_value)

    - #### addFieldValue

          public static void addFieldValue(Element el,
                                           String f_name,
                                           String f_value,
                                           String label,
                                           String[] labels,
                                           String[] options)

    - #### addFieldValue

          public static void addFieldValue(Element el,
                                           String f_name,
                                           String[] f_values,
                                           String label,
                                           String[] labels,
                                           String[] options)

    - #### addFieldValue

          public static void addFieldValue(Element el,
                                           String f_name,
                                           String f_value,
                                           String label,
                                           String[] labels,
                                           String[] options,
                                           String type)

    - #### addFieldValue

          public static void addFieldValue(Element el,
                                           String f_name,
                                           String f_value,
                                           String type)

    - #### addFieldValue

          public static void addFieldValue(Element el,
                                           String f_name,
                                           String f_value,
                                           String type,
                                           String label)

    - #### addHiddenField

          public static void addHiddenField(Element el,
                                            String f_name,
                                            String f_value)

    - #### addInstructions

          public static void addInstructions(Element el,
                                             String instructions)

    - #### addTextField

          public static void addTextField(Element el,
                                          String f_name,
                                          String f_value)

    - #### addTitle

          public static void addTitle(Element el,
                                      String title)

    - #### createDataForm

          public static Element createDataForm(Command.DataType data_type)

    - #### getFieldKeyStartingWith

          public static String getFieldKeyStartingWith(Element el,
                                                       String f_name)

    - #### getFieldValue

          public static String getFieldValue(Element el,
                                             String f_name)

    - #### getFieldValues

          public static String[] getFieldValues(Element el,
                                                String f_name)

    - #### getFields

          public static Set<String> getFields(Element el)

    - #### getFormType

          public static String getFormType(Element form)

    - #### removeFieldValue

          public static boolean removeFieldValue(Element el,
                                                 String f_name)

Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.