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
 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:

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-2012 Tigase. All Rights Reserved.