Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community
Enum DocumentFieldType.DataType

java.lang.Object
  extended by java.lang.Enum<DocumentFieldType.DataType>
      extended by com.jivesoftware.community.DocumentFieldType.DataType
All Implemented Interfaces:
Serializable, Comparable<DocumentFieldType.DataType>
Enclosing interface:
DocumentFieldType

public static enum DocumentFieldType.DataType
extends Enum<DocumentFieldType.DataType>
implements Serializable

Represents the XMPP data form field type.


Enum Constant Summary
BOOLEAN
          The field enables an entity to gather or provide an either-or choice between two options.
FIXED
          The field is intended for data description (e.g., human-readable text such as "section" headers) rather than data gathering or provision.
HIDDEN
          The field is not shown to the entity providing information, but instead is returned with the form.
JID_MULTI
          The field enables an entity to gather or provide multiple Jabber IDs.
JID_SINGLE
          The field enables an entity to gather or provide a single Jabber ID.
LIST_MULTI
          The field enables an entity to gather or provide one or more options from among many.
LIST_SINGLE
          The field enables an entity to gather or provide one option from among many.
TEXT_MULTI
          The field enables an entity to gather or provide multiple lines of text.
TEXT_PRIVATE
          The field enables an entity to gather or provide a single line or word of text, which shall be obscured in an interface (e.g., *****).
TEXT_SINGLE
          The field enables an entity to gather or provide a single line or word of text, which may be shown in an interface.
 
Method Summary
static DocumentFieldType.DataType getDataType(long dataTypeID)
          Used to acquire a DataType with a specific data type ID.
 int getId()
           
 String getName()
           
 String toString()
          Simply returns the name (via getName()) since that is unique.
static DocumentFieldType.DataType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DocumentFieldType.DataType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BOOLEAN

public static final DocumentFieldType.DataType BOOLEAN
The field enables an entity to gather or provide an either-or choice between two options. The default getValue is "false"


FIXED

public static final DocumentFieldType.DataType FIXED
The field is intended for data description (e.g., human-readable text such as "section" headers) rather than data gathering or provision.


HIDDEN

public static final DocumentFieldType.DataType HIDDEN
The field is not shown to the entity providing information, but instead is returned with the form.


JID_MULTI

public static final DocumentFieldType.DataType JID_MULTI
The field enables an entity to gather or provide multiple Jabber IDs.


JID_SINGLE

public static final DocumentFieldType.DataType JID_SINGLE
The field enables an entity to gather or provide a single Jabber ID.


LIST_MULTI

public static final DocumentFieldType.DataType LIST_MULTI
The field enables an entity to gather or provide one or more options from among many.


LIST_SINGLE

public static final DocumentFieldType.DataType LIST_SINGLE
The field enables an entity to gather or provide one option from among many.


TEXT_MULTI

public static final DocumentFieldType.DataType TEXT_MULTI
The field enables an entity to gather or provide multiple lines of text.


TEXT_PRIVATE

public static final DocumentFieldType.DataType TEXT_PRIVATE
The field enables an entity to gather or provide a single line or word of text, which shall be obscured in an interface (e.g., *****).


TEXT_SINGLE

public static final DocumentFieldType.DataType TEXT_SINGLE
The field enables an entity to gather or provide a single line or word of text, which may be shown in an interface. This field type is the default and MUST be assumed if an entity receives a field type it does not understand.

Method Detail

values

public static final DocumentFieldType.DataType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DocumentFieldType.DataType c : DocumentFieldType.DataType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DocumentFieldType.DataType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name

getName

public String getName()

getId

public int getId()

toString

public String toString()
Simply returns the name (via getName()) since that is unique.

Overrides:
toString in class Enum<DocumentFieldType.DataType>
Returns:
the name of this type.

getDataType

public static DocumentFieldType.DataType getDataType(long dataTypeID)
Used to acquire a DataType with a specific data type ID.

Parameters:
dataTypeID - ID of the type
Returns:
the matching DataType or a IllegalArgumentException will be thrown if the data type ID is invalid.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.