Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Enum DocumentTypeElement.Type

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

public static enum DocumentTypeElement.Type
extends java.lang.Enum<DocumentTypeElement.Type>

Simple enumerated type for Document elements.


Enum Constant Summary
ATTACHMENT
          This element should be used to create an attachement for the document.
BODY
          This element should be used to create the document body.
DOCUMENT_FIELD
          Used to specify that the DocumentTypeElement is actually a DocumentField.
EXPIRATION_DATE
          Used to specify the date the document will expire
LABEL
          Used to add a label to document creation process
LANGUAGE
          This element should be used to determine the language of the document.
SECTION
          Used to specify a section in the document creation
SUMMARY
          This element should be used to create the document summary.
TAG
          Used to specify tags that can be used to group document documents
TITLE
          This element should be used to create the document's title.
 
Method Summary
static java.util.List<DocumentTypeElement.Type> getBuiltinTypes()
          Returns a list of all the builtin types
 long getID()
          Returns the id of this type
 java.lang.String getName()
          Returns the text representation of this Type
static DocumentTypeElement.Type getType(long id)
          Acquires a Type by its ID.
static DocumentTypeElement.Type getType(java.lang.String name)
          Acquires a Type by its string name.
 boolean isBuiltIn()
          If this Type is a builtin type (body, summary, attachment, etc) then this method will return true;
 void setId(long id)
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
static DocumentTypeElement.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DocumentTypeElement.Type[] 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

DOCUMENT_FIELD

public static final DocumentTypeElement.Type DOCUMENT_FIELD
Used to specify that the DocumentTypeElement is actually a DocumentField. The method getDocumentField will also return a non null values. Values created using this should be stored in the document as DocumentFieldValue objects.


BODY

public static final DocumentTypeElement.Type BODY
This element should be used to create the document body. The body created using this should be saved to the document using the Document.setBody(String) or Document.setBinaryBody(String, String, java.io.InputStream) method.


SUMMARY

public static final DocumentTypeElement.Type SUMMARY
This element should be used to create the document summary. Content created using the should be saved to Document.setSummary(String) method.


ATTACHMENT

public static final DocumentTypeElement.Type ATTACHMENT
This element should be used to create an attachement for the document.


TITLE

public static final DocumentTypeElement.Type TITLE
This element should be used to create the document's title.


LANGUAGE

public static final DocumentTypeElement.Type LANGUAGE
This element should be used to determine the language of the document.


TAG

public static final DocumentTypeElement.Type TAG
Used to specify tags that can be used to group document documents


EXPIRATION_DATE

public static final DocumentTypeElement.Type EXPIRATION_DATE
Used to specify the date the document will expire


SECTION

public static final DocumentTypeElement.Type SECTION
Used to specify a section in the document creation


LABEL

public static final DocumentTypeElement.Type LABEL
Used to add a label to document creation process

Method Detail

values

public static final DocumentTypeElement.Type[] 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(DocumentTypeElement.Type c : DocumentTypeElement.Type.values())
        System.out.println(c);

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

valueOf

public static DocumentTypeElement.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 name

getName

public java.lang.String getName()
Returns the text representation of this Type

Returns:
the text representation of this Type

setName

public void setName(java.lang.String name)

getID

public long getID()
Returns the id of this type

Returns:
the id of this type

setId

public void setId(long id)

isBuiltIn

public boolean isBuiltIn()
If this Type is a builtin type (body, summary, attachment, etc) then this method will return true;

Returns:
true if this is a built-in type

getType

public static DocumentTypeElement.Type getType(java.lang.String name)
Acquires a Type by its string name.

Parameters:
name - name of the type.
Returns:
The type that matches this name.

getType

public static DocumentTypeElement.Type getType(long id)
Acquires a Type by its ID.

Parameters:
id - id of the type
Returns:
the type that matches the id

getBuiltinTypes

public static java.util.List<DocumentTypeElement.Type> getBuiltinTypes()
Returns a list of all the builtin types

Returns:
a list of all the builtin types

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<DocumentTypeElement.Type>

Clearspace Project Page

Copyright © 1999-2007 Jive Software.