org.apache.lokahi.core.api.state
Enum State

java.lang.Object
  extended by java.lang.Enum<State>
      extended by org.apache.lokahi.core.api.state.State
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<State>, Collectable, Restable

public enum State
extends java.lang.Enum<State>
implements Collectable, Restable

Version:
$Id: State.java,v 1.3 2006/03/07 20:18:49 drtobes Exp $
Author:
Stephen Toback

Enum Constant Summary
ACTIVE
           
CANCEL
           
COMPLETE
           
FAILED
           
INACTIVE
           
NEW
           
RUNNING
           
 
Method Summary
 java.lang.StringBuilder buildShortXMLRepresentation()
          Builds a short xml representation of this object containing name, and primary key.
 java.lang.StringBuilder buildXMLRepresention()
          Builds a xml representation of this object
protected static java.lang.StringBuilder elementBuilder(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> a)
           
protected static java.lang.StringBuilder elementBuilder(java.lang.String name, java.lang.String value)
           
 java.lang.String getColor()
           
 java.lang.String getName()
          Gets the name.
 int getPk()
          Gets the primary key
static State getState(int id)
           
static java.util.Collection<State> getStates()
           
 boolean isFinal()
           
static State valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static State[] 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

NEW

public static final State NEW

RUNNING

public static final State RUNNING

CANCEL

public static final State CANCEL

COMPLETE

public static final State COMPLETE

FAILED

public static final State FAILED

ACTIVE

public static final State ACTIVE

INACTIVE

public static final State INACTIVE
Method Detail

values

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

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

valueOf

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

getPk

public int getPk()
Description copied from interface: Collectable
Gets the primary key

Specified by:
getPk in interface Collectable
Returns:
the int primary key

getName

public java.lang.String getName()
Description copied from interface: Collectable
Gets the name.

Specified by:
getName in interface Collectable
Returns:
the String name.

getColor

public java.lang.String getColor()

getState

public static State getState(int id)

getStates

public static java.util.Collection<State> getStates()

isFinal

public boolean isFinal()

buildShortXMLRepresentation

public java.lang.StringBuilder buildShortXMLRepresentation()
Description copied from interface: Restable
Builds a short xml representation of this object containing name, and primary key.

Specified by:
buildShortXMLRepresentation in interface Restable
Returns:
the xml representation

buildXMLRepresention

public java.lang.StringBuilder buildXMLRepresention()
Description copied from interface: Restable
Builds a xml representation of this object

Specified by:
buildXMLRepresention in interface Restable
Returns:
the xml representation

elementBuilder

protected static java.lang.StringBuilder elementBuilder(java.lang.String name,
                                                        java.util.Map<java.lang.String,java.lang.String> a)

elementBuilder

protected static java.lang.StringBuilder elementBuilder(java.lang.String name,
                                                        java.lang.String value)