Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber
Class ChatRoomConfigurationFormFieldJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.ChatRoomConfigurationFormFieldJabberImpl
All Implemented Interfaces:
ChatRoomConfigurationFormField

public class ChatRoomConfigurationFormFieldJabberImpl
extends Object
implements ChatRoomConfigurationFormField

The Jabber protocol implementation of the ChatRoomConfigurationFormField. This implementation is based on the smack Form and FormField types.

Author:
Yana Stamcheva

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.ChatRoomConfigurationFormField
TYPE_BOOLEAN, TYPE_LIST_MULTI, TYPE_LIST_SINGLE, TYPE_TEXT_FIXED, TYPE_TEXT_MULTI, TYPE_TEXT_PRIVATE, TYPE_TEXT_SINGLE, TYPE_UNDEFINED
 
Constructor Summary
ChatRoomConfigurationFormFieldJabberImpl(org.jivesoftware.smackx.FormField formField, org.jivesoftware.smackx.Form submitForm)
          Creates an instance of ChatRoomConfigurationFormFieldJabberImpl by passing to it the smack form field and the smack submit form, which are the base of this implementation.
 
Method Summary
 void addValue(Object value)
          Adds the given value to the list of values of this field.
 String getDescription()
          Returns the description of the corresponding smack property.
 String getLabel()
          Returns the label of the corresponding smack property.
 String getName()
          Returns the variable name of the corresponding smack property.
 Iterator<String> getOptions()
          Returns the options of the corresponding smack property.
 String getType()
          For each of the smack form field types returns the corresponding ChatRoomConfigurationFormField type.
 Iterator<?> getValues()
          Returns an Iterator over the list of values of this field.
 boolean isRequired()
          Returns the isRequired property of the corresponding smack property.
 void setValues(Object[] newValues)
          Sets the given list of values to this field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatRoomConfigurationFormFieldJabberImpl

public ChatRoomConfigurationFormFieldJabberImpl(org.jivesoftware.smackx.FormField formField,
                                                org.jivesoftware.smackx.Form submitForm)
Creates an instance of ChatRoomConfigurationFormFieldJabberImpl by passing to it the smack form field and the smack submit form, which are the base of this implementation.

Parameters:
formField - the smack form field
submitForm - the smack submit form
Method Detail

getName

public String getName()
Returns the variable name of the corresponding smack property.

Specified by:
getName in interface ChatRoomConfigurationFormField
Returns:
the variable name of the corresponding smack property

getDescription

public String getDescription()
Returns the description of the corresponding smack property.

Specified by:
getDescription in interface ChatRoomConfigurationFormField
Returns:
the description of the corresponding smack property

getLabel

public String getLabel()
Returns the label of the corresponding smack property.

Specified by:
getLabel in interface ChatRoomConfigurationFormField
Returns:
the label of the corresponding smack property

getOptions

public Iterator<String> getOptions()
Returns the options of the corresponding smack property.

Specified by:
getOptions in interface ChatRoomConfigurationFormField
Returns:
the options of the corresponding smack property

isRequired

public boolean isRequired()
Returns the isRequired property of the corresponding smack property.

Specified by:
isRequired in interface ChatRoomConfigurationFormField
Returns:
the isRequired property of the corresponding smack property

getType

public String getType()
For each of the smack form field types returns the corresponding ChatRoomConfigurationFormField type.

Specified by:
getType in interface ChatRoomConfigurationFormField
Returns:
the type of the property

getValues

public Iterator<?> getValues()
Returns an Iterator over the list of values of this field.

Specified by:
getValues in interface ChatRoomConfigurationFormField
Returns:
an Iterator over the list of values of this field

addValue

public void addValue(Object value)
Adds the given value to the list of values of this field.

Specified by:
addValue in interface ChatRoomConfigurationFormField
Parameters:
value - the value to add

setValues

public void setValues(Object[] newValues)
Sets the given list of values to this field.

Specified by:
setValues in interface ChatRoomConfigurationFormField
Parameters:
newValues - the list of values to set

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.