tigase.jaxmpp.core.client.xmpp.forms

## Class AbstractField<T>

- java.lang.Object
- - tigase.jaxmpp.core.client.xml.ElementWrapper
  - - tigase.jaxmpp.core.client.xmpp.forms.AbstractField<T>

- Type Parameters:
    `T` - type of field
  All Implemented Interfaces:
    Element, Field<T>
  Direct Known Subclasses:
    BooleanField, FixedField, HiddenField, JidMultiField, JidSingleField, ListMultiField, ListSingleField, TextMultiField, TextPrivateField, TextSingleField

      public abstract class AbstractField<T>
      extends ElementWrapper
      implements Field<T>

  Abstract class to implement fields.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDesc()` Returns natural-language description 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` | `setLabel(String label)` Sets label of field.
    `void` | `setRequired(boolean value)` Set if this field is required one.
    `void` | `setVar(String var)` Sets name of field.

    - ### Methods inherited from class tigase.jaxmpp.core.client.xml.ElementWrapper

      `addChild, equals, findChild, getAsString, getAttribute, getAttributes, getChildAfter, getChildElementValue, getChildElementValue, getChildren, getChildren, getChildrenNS, getChildrenNS, getFirstChild, getFirstChild, getName, getNextSibling, getParent, getValue, getWrappedElement, getXMLNS, hashCode, removeAttribute, removeChild, setAttribute, setAttributes, setChildElementValue, setChildElementValue, setParent, setValue, setXMLNS`

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

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

    - ### Methods inherited from interface tigase.jaxmpp.core.client.xmpp.forms.Field

      `getFieldValue, setFieldValue`

- - ### Method Detail

    - #### getDesc

          public String getDesc()
                         throws XMLException

      Returns natural-language description of field.
      Specified by:
        `getDesc` in interface `Field<T>`
      Returns:
        description of field
      Throws:
        `XMLException`

    - #### getLabel

          public String getLabel()
                          throws XMLException

      Returns label of field.
      Specified by:
        `getLabel` in interface `Field<T>`
      Returns:
        label
      Throws:
        `XMLException`

    - #### getType

          public 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
      Specified by:
        `getType` in interface `Field<T>`
      Returns:
        field type.
      Throws:
        `XMLException`

    - #### getVar

          public String getVar()
                        throws XMLException

      Returns name of field.
      Specified by:
        `getVar` in interface `Field<T>`
      Returns:
        name of field
      Throws:
        `XMLException`

    - #### isRequired

          public boolean isRequired()
                             throws XMLException

      Get is this field is required.
      Specified by:
        `isRequired` in interface `Field<T>`
      Returns:
        `true` is field is required.
      Throws:
        `XMLException`

    - #### setDesc

          public void setDesc(String desc)
                       throws XMLException

      Set natural-language description of field.
      Specified by:
        `setDesc` in interface `Field<T>`
      Parameters:
        `desc` - description of field
      Throws:
        `XMLException`

    - #### setLabel

          public void setLabel(String label)
                        throws XMLException

      Sets label of field.
      Specified by:
        `setLabel` in interface `Field<T>`
      Parameters:
        `label` - label of field.
      Throws:
        `XMLException`

    - #### setRequired

          public void setRequired(boolean value)
                           throws XMLException

      Set if this field is required one.
      Specified by:
        `setRequired` in interface `Field<T>`
      Parameters:
        `value` - `true` is field is required
      Throws:
        `XMLException`

    - #### setVar

          public void setVar(String var)
                      throws XMLException

      Sets name of field.
      Specified by:
        `setVar` in interface `Field<T>`
      Parameters:
        `var` - name of field.
      Throws:
        `XMLException`

Copyright © 2006–2016 Tigase. All rights reserved.