com.levigo.jadice.document
Enum Document.BasicState

java.lang.Object
  extended by java.lang.Enum<Document.BasicState>
      extended by com.levigo.jadice.document.Document.BasicState
All Implemented Interfaces:
Document.State, Serializable, Comparable<Document.BasicState>
Enclosing interface:
Document

public static enum Document.BasicState
extends Enum<Document.BasicState>
implements Document.State

An enum consisting of the default document states. The states contained therein are recognized by the default command implementations. If you add document states by supplying your own implementation of the Document.State interface, you may have to extend or re-implement those commands.


Enum Constant Summary
BUSY
          This Document.State has a meaning similar to LOADING.
CLOSED
          Usually this Document.State marks the end of a Document's lifecycle and is its terminal Document.State.
LOADING
          If this Document.State is set, it marks a Document as loading and therefore still incomplete.
READY
          This state marks a Document as being ready for use.
UNKNOWN
          Marks a Document as being in an unusual, unexpected, or generally unspecified state.
 
Method Summary
static Document.BasicState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Document.BasicState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

READY

public static final Document.BasicState READY
This state marks a Document as being ready for use. Commands or components relying on a Document's state usually enable their functionality whenever READY is set.


LOADING

public static final Document.BasicState LOADING
If this Document.State is set, it marks a Document as loading and therefore still incomplete. It might be already useful but some parts of it may be missing.

Reader and Fluent Reader API both set this Document.State when loading into a Document begins. Usually, it need not be used by integrators directly. BUSY is a semantically similar alternative.


BUSY

public static final Document.BasicState BUSY
This Document.State has a meaning similar to LOADING. It is intended to be used by integrators in situations in which Documents are being restructured or in some other way worked with and therefore not ready for other uses. BUSY has a broader range of applications than LOADING which specifically indicates a loading process by the Reader or Fluent Reader API.


CLOSED

public static final Document.BasicState CLOSED
Usually this Document.State marks the end of a Document's lifecycle and is its terminal Document.State. After a Document has been disposed of it will be in this Document.State. It is also possible to set this state directly and transition from it to some other Document.State as long as the Document has not yet been disposed of. In this case, CLOSED can take the meaning of "temporarily closed".

See Also:
which automatically attempts to set state CLOSED and, if the state change isn't intercepted, performs clean-up tasks and disposes of the {@link Document}., which sets state CLOSED without consulting interceptors

UNKNOWN

public static final Document.BasicState UNKNOWN
Marks a Document as being in an unusual, unexpected, or generally unspecified state. This could be the result of a processing error, but need not necessarily be.

Method Detail

values

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

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

valueOf

public static Document.BasicState 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
NullPointerException - if the argument is null


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.