Class XFormFieldImpl
- java.lang.Object
-
- org.jivesoftware.openfire.forms.spi.XFormFieldImpl
-
- All Implemented Interfaces:
FormField
@Deprecated public class XFormFieldImpl extends Object implements FormField
Deprecated.replaced byFormField
A concrete FormField capable of sending itself to a writer and recover its state from an XMPP stanza.- Author:
- gdombiak
-
-
Field Summary
-
Fields inherited from interface org.jivesoftware.openfire.forms.FormField
TYPE_BOOLEAN, TYPE_FIXED, TYPE_HIDDEN, TYPE_JID_MULTI, TYPE_JID_SINGLE, TYPE_LIST_MULTI, TYPE_LIST_SINGLE, TYPE_TEXT_MULTI, TYPE_TEXT_PRIVATE, TYPE_TEXT_SINGLE
-
-
Constructor Summary
Constructors Constructor Description XFormFieldImpl()
Deprecated.XFormFieldImpl(String variable)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addOption(String label, String value)
Deprecated.Adds an available option to the question that the user has in order to answer the question.void
addValue(String value)
Deprecated.Adds a default value to the question if the question is part of a form to fill out.org.dom4j.Element
asXMLElement()
Deprecated.void
clearValues()
Deprecated.Removes all the values of the field.String
getDescription()
Deprecated.Returns a description that provides extra clarification about the question.String
getLabel()
Deprecated.Returns the label of the question which should give enough information to the user to fill out the form.String
getName()
Deprecated.String
getNamespace()
Deprecated.String
getType()
Deprecated.Returns an indicative of the format for the data to answer.Iterator<String>
getValues()
Deprecated.Returns an Iterator for the default values of the question if the question is part of a form to fill out.String
getVariable()
Deprecated.Returns the variable name that the question is filling out.boolean
isRequired()
Deprecated.Returns true if the question must be answered in order to complete the questionnaire.void
parse(org.dom4j.Element formElement)
Deprecated.void
setDescription(String description)
Deprecated.Sets a description that provides extra clarification about the question.void
setLabel(String label)
Deprecated.Sets the label of the question which should give enough information to the user to fill out the form.void
setName(String name)
Deprecated.void
setNamespace(String namespace)
Deprecated.void
setRequired(boolean required)
Deprecated.Sets if the question must be answered in order to complete the questionnaire.void
setType(String type)
Deprecated.Sets an indicative of the format for the data to answer.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
XFormFieldImpl
public XFormFieldImpl()
Deprecated.
-
XFormFieldImpl
public XFormFieldImpl(String variable)
Deprecated.
-
-
Method Detail
-
getNamespace
public String getNamespace()
Deprecated.
-
setNamespace
public void setNamespace(String namespace)
Deprecated.
-
getName
public String getName()
Deprecated.
-
setName
public void setName(String name)
Deprecated.
-
asXMLElement
public org.dom4j.Element asXMLElement()
Deprecated.
-
addValue
public void addValue(String value)
Deprecated.Description copied from interface:FormField
Adds a default value to the question if the question is part of a form to fill out. Otherwise, adds an answered value to the question.
-
clearValues
public void clearValues()
Deprecated.Description copied from interface:FormField
Removes all the values of the field.- Specified by:
clearValues
in interfaceFormField
-
addOption
public void addOption(String label, String value)
Deprecated.Description copied from interface:FormField
Adds an available option to the question that the user has in order to answer the question.
-
setType
public void setType(String type)
Deprecated.Description copied from interface:FormField
Sets an indicative of the format for the data to answer. Valid formats are:- text-single -> single line or word of text
- text-private -> instead of showing the user what they typed, you show ***** to protect it
- text-multi -> multiple lines of text entry
- list-single -> given a list of choices, pick one
- list-multi -> given a list of choices, pick one or more
- boolean -> 0 or 1, true or false, yes or no. Default value is 0
- fixed -> fixed for putting in text to show sections, or just advertise your web site in the middle of the form
- hidden -> is not given to the user at all, but returned with the questionnaire
- jid-single -> Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
- jid-multi -> multiple entries for JIDs
-
setRequired
public void setRequired(boolean required)
Deprecated.Description copied from interface:FormField
Sets if the question must be answered in order to complete the questionnaire.- Specified by:
setRequired
in interfaceFormField
- Parameters:
required
- if the question must be answered in order to complete the questionnaire.
-
setLabel
public void setLabel(String label)
Deprecated.Description copied from interface:FormField
Sets the label of the question which should give enough information to the user to fill out the form.
-
setDescription
public void setDescription(String description)
Deprecated.Description copied from interface:FormField
Sets a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.If the question is of type FIXED then the description should remain empty.
- Specified by:
setDescription
in interfaceFormField
- Parameters:
description
- provides extra clarification about the question.
-
isRequired
public boolean isRequired()
Deprecated.Description copied from interface:FormField
Returns true if the question must be answered in order to complete the questionnaire.- Specified by:
isRequired
in interfaceFormField
- Returns:
- true if the question must be answered in order to complete the questionnaire.
-
getVariable
public String getVariable()
Deprecated.Description copied from interface:FormField
Returns the variable name that the question is filling out.- Specified by:
getVariable
in interfaceFormField
- Returns:
- the variable name of the question.
-
getValues
public Iterator<String> getValues()
Deprecated.Description copied from interface:FormField
Returns an Iterator for the default values of the question if the question is part of a form to fill out. Otherwise, returns an Iterator for the answered values of the question.
-
getType
public String getType()
Deprecated.Description copied from interface:FormField
Returns an indicative of the format for the data to answer. Valid formats are:- text-single -> single line or word of text
- text-private -> instead of showing the user what they typed, you show ***** to protect it
- text-multi -> multiple lines of text entry
- list-single -> given a list of choices, pick one
- list-multi -> given a list of choices, pick one or more
- boolean -> 0 or 1, true or false, yes or no. Default value is 0
- fixed -> fixed for putting in text to show sections, or just advertise your web site in the middle of the form
- hidden -> is not given to the user at all, but returned with the questionnaire
- jid-single -> Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
- jid-multi -> multiple entries for JIDs
-
getLabel
public String getLabel()
Deprecated.Description copied from interface:FormField
Returns the label of the question which should give enough information to the user to fill out the form.
-
getDescription
public String getDescription()
Deprecated.Description copied from interface:FormField
Returns a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.If the question is of type FIXED then the description should remain empty.
- Specified by:
getDescription
in interfaceFormField
- Returns:
- description that provides extra clarification about the question.
-
parse
public void parse(org.dom4j.Element formElement)
Deprecated.
-
-