Package org.jivesoftware.smackx.xdata
Enum FormField.Type
- java.lang.Object
-
- java.lang.Enum<FormField.Type>
-
- org.jivesoftware.smackx.xdata.FormField.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FormField.Type>
- Enclosing class:
- FormField
public static enum FormField.Type extends java.lang.Enum<FormField.Type>
Form Field Types as defined in XEP-4 § 3.3.- See Also:
- XEP-4 § 3.3 Field Types
-
-
Enum Constant Summary
Enum Constants Enum Constant Description bool
Boolean type.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_multi
multiple entries for JIDs.jid_single
Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.list_multi
Given a list of choices, pick one or more.list_single
Given a list of choices, pick one.text_multi
Multiple lines of text entry.text_private
Instead of showing the user what they typed, you show ***** to protect it.text_single
Single line or word of text.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FormField.Type
fromString(java.lang.String string)
Get a form field type from the given string.java.lang.String
toString()
static FormField.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FormField.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
bool
public static final FormField.Type bool
Boolean type. Can be 0 or 1, true or false, yes or no. Default value is 0.Note that in XEP-4 this type is called 'boolean', but since that String is a restricted keyword in Java, it is named 'bool' in Smack.
-
fixed
public static final FormField.Type fixed
Fixed for putting in text to show sections, or just advertise your web site in the middle of the form.
-
hidden
public static final FormField.Type hidden
Is not given to the user at all, but returned with the questionnaire.
-
jid_multi
public static final FormField.Type jid_multi
multiple entries for JIDs.
-
jid_single
public static final FormField.Type jid_single
Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
-
list_multi
public static final FormField.Type list_multi
Given a list of choices, pick one or more.
-
list_single
public static final FormField.Type list_single
Given a list of choices, pick one.
-
text_multi
public static final FormField.Type text_multi
Multiple lines of text entry.
-
text_private
public static final FormField.Type text_private
Instead of showing the user what they typed, you show ***** to protect it.
-
text_single
public static final FormField.Type text_single
Single line or word of text.
-
-
Method Detail
-
values
public static FormField.Type[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FormField.Type c : FormField.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FormField.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<FormField.Type>
-
fromString
public static FormField.Type fromString(java.lang.String string)
Get a form field type from the given string. Ifstring
is null, then null will be returned.- Parameters:
string
- the string to transform or null.- Returns:
- the type or null.
-
-