tigase.jaxmpp.core.client.xmpp.forms

## Interface Field<T>

- Type Parameters:
    `T` - type of value
  All Known Implementing Classes:
    AbstractField, BooleanField, FixedField, HiddenField, JidMultiField, JidSingleField, ListMultiField, ListSingleField, TextMultiField, TextPrivateField, TextSingleField

      public interface Field<T>

  Base interface for fields.
  Author:
    bmalkow

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDesc()` Returns natural-language description of field.
    `T` | `getFieldValue()` Returns value of field.
    `String` | `getLabel()` Returns label of field.
    `String` | `getType()` Returns field type.
    `String` | `getVar()` Returns name of field.
    `boolean` | `isRequired()` Get is this field is required.
    `void` | `setDesc(String desc)` Set natural-language description of field.
    `void` | `setFieldValue(T value)` Sets value of field.
    `void` | `setLabel(String label)` Sets label of field.
    `void` | `setRequired(boolean isRequired)` Set if this field is required one.
    `void` | `setVar(String var)` Sets name of field.

- - ### Method Detail

    - #### getDesc

          String getDesc()
                  throws XMLException

      Returns natural-language description of field.
      Returns:
        description of field
      Throws:
        `XMLException`

    - #### getFieldValue

          T getFieldValue()
                   throws XMLException

      Returns value of field.
      Returns:
        value
      Throws:
        `XMLException`

    - #### getLabel

          String getLabel()
                   throws XMLException

      Returns label of field.
      Returns:
        label
      Throws:
        `XMLException`

    - #### getType

          String getType()
                  throws XMLException

      Returns field type. Types described in XEP-0004:
      - boolean - implementation class BooleanField
      - fixed - implementation class FixedField
      - hidden - implementation class HiddenField
      - jid-multi - implementation class JidMultiField
      - jid-single - implementation class JidSingleField
      - list-multi - implementation class ListMultiField
      - list-single - implementation class ListSingleField
      - text-multi - implementation class TextMultiField
      - text-private - implementation class TextPrivateField
      - text-single - implementation class TextSingleField
      Returns:
        field type.
      Throws:
        `XMLException`

    - #### getVar

          String getVar()
                 throws XMLException

      Returns name of field.
      Returns:
        name of field
      Throws:
        `XMLException`

    - #### isRequired

          boolean isRequired()
                      throws XMLException

      Get is this field is required.
      Returns:
        `true` is field is required.
      Throws:
        `XMLException`

    - #### setDesc

          void setDesc(String desc)
                throws XMLException

      Set natural-language description of field.
      Parameters:
        `desc` - description of field
      Throws:
        `XMLException`

    - #### setFieldValue

          void setFieldValue(T value)
                      throws XMLException

      Sets value of field.
      Parameters:
        `value` - value of field
      Throws:
        `XMLException`

    - #### setLabel

          void setLabel(String label)
                 throws XMLException

      Sets label of field.
      Parameters:
        `label` - label of field.
      Throws:
        `XMLException`

    - #### setRequired

          void setRequired(boolean isRequired)
                    throws XMLException

      Set if this field is required one.
      Parameters:
        `isRequired` - `true` is field is required
      Throws:
        `XMLException`

    - #### setVar

          void setVar(String var)
               throws XMLException

      Sets name of field.
      Parameters:
        `var` - name of field.
      Throws:
        `XMLException`

Copyright © 2006–2016 Tigase. All rights reserved.