Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community
Enum DocumentState

java.lang.Object
  extended by java.lang.Enum<DocumentState>
      extended by com.jivesoftware.community.DocumentState
All Implemented Interfaces:
com.jivesoftware.community.cache.Cacheable, Serializable, Comparable<DocumentState>

public enum DocumentState
extends Enum<DocumentState>
implements com.jivesoftware.community.cache.Cacheable

Throughout the document lifecycle a document will have different documents states appropriate to where it is along the lifecycle. There is a built-in limitation to the system where there can only be a single document in the 'published' state at any given moment in time.


Enum Constant Summary
ARCHIVED
          Archived document state.
DELETED
          Deleted document state.
EXPIRED
          Expired document state.
INCOMPLETE
          Incomplete document state.
PENDING_APPROVAL
          Pending Approval document state.
PUBLISHED
          Published document state.
REJECTED
          Rejected document state.
 
Method Summary
 int getCachedSize()
           
static DocumentState getDocumentState(String state)
          A helper method to get a specific DocumentState object from its key
 String getState()
           
static DocumentState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DocumentState[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INCOMPLETE

public static final DocumentState INCOMPLETE
Incomplete document state. Documents in this state may not be complete.


PENDING_APPROVAL

public static final DocumentState PENDING_APPROVAL
Pending Approval document state. Documents in this state are complete but are not yet approved.


REJECTED

public static final DocumentState REJECTED
Rejected document state. Documents in this state have been rejected for publication by an approver.


PUBLISHED

public static final DocumentState PUBLISHED
Published document state.


EXPIRED

public static final DocumentState EXPIRED
Expired document state.


DELETED

public static final DocumentState DELETED
Deleted document state.


ARCHIVED

public static final DocumentState ARCHIVED
Archived document state.

Method Detail

values

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

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

valueOf

public static DocumentState 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

getState

public String getState()

getDocumentState

public static DocumentState getDocumentState(String state)
A helper method to get a specific DocumentState object from its key

Parameters:
state - the state value of the DocumentState object
Returns:
the DocumentState object corresponding to the key value. NULL if the key is invalid.

getCachedSize

public int getCachedSize()
Specified by:
getCachedSize in interface com.jivesoftware.community.cache.Cacheable

Clearspace Project Page

Copyright © 1999-2007 Jive Software.