tigase.jaxmpp.core.client.xmpp.forms
Class AbstractField<T>

java.lang.Object
  extended by tigase.jaxmpp.core.client.xml.ElementWrapper
      extended by 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
 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, getAsString, getAttribute, getAttributes, getChildAfter, getChildElementValue, getChildElementValue, getChildren, getChildren, getChildrenNS, getChildrenNS, getFirstChild, getFirstChild, getName, getNextSibling, getParent, getValue, 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:

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