wt.lifecycle
Class State

java.lang.Object
  extended bywt.fc.EnumeratedType
      extended bywt.lifecycle.State
All Implemented Interfaces:
EnumeratedType, LocalizableMessage, LocalizableMetadata, Message, Serializable

public class State
extends EnumeratedType
implements Serializable

State is a specialization of EnumeratedType to provide localizable state values. The localized values for states are maintained in a resource bundle StateRB, and its locale derivatives

Released is a required state.

Supported API: true

Extendable: false

See Also:
EnumeratedType, wt.lifecycle.StateRB, Serialized Form

Nested Class Summary
 
Nested classes inherited from class wt.fc.EnumeratedType
 
Field Summary
private static String CLASS_RESOURCE
           
private static String CLASSNAME
           
static State DROPPED
          Static final constant

Supported API: false
static State INWORK
          Static final constant

Supported API: true
private static Hashtable localeSets
           
static State RELEASED
          Static final constant

Supported API: true
private static String RESOURCE
           
static State UNDERREVIEW
          Static final constant

Supported API: true
private static EnumeratedType[] valueSet
           
 
Fields inherited from class wt.fc.EnumeratedType
secretHandshake, SEP_CHAR
 
Fields inherited from interface wt.meta.EnumeratedType
DEFAULT_VALUE, ORDER, SELECTABLE
 
Constructor Summary
protected State()
          Used by sub-classes that need a default constructor.
 
Method Summary
protected  EnumeratedType[] getLocaleSet(Locale locale)
          Returns the set of values (instances) for this instance, for the specified locale.
static State getStateDefault()
          Returns the default value (instance) for the State set.
static State[] getStateSet()
          Returns a copy of the set of valid values (instances) for the State class.
 EnumeratedType[] getValueSet()
          Returns a copy of the set of valid values (instances) for this instance, for the current user locale.
private static EnumeratedType[] initializeLocaleSet(Locale locale)
           
static State newState(int secretHandshake)
          Used by EnumeratedType for constructing instances of State, from a resource bundle.
static State toState(String internal_value)
          Returns the State instance for the internal_value argument.
protected  EnumeratedType[] valueSet()
          Returns a reference to the set of valid values (instances) for this instance.
 
Methods inherited from class wt.fc.EnumeratedType
defaultEnumeratedType, dynamicInstance, equals, getAbbreviatedDisplay, getComment, getComment, getDisplay, getDisplay, getFullDisplay, getInternalKey, getLocalizedMessage, getLocalizedValues, getLongDescription, getOrder, getSelectableValueSet, getShortDescription, getShortDescription, getStringValue, getStringValue, getValidSet, getValue, hashCode, instantiateSet, isDefaultValue, isDefaultValue, isPrimaryKey, isSelectable, main, readResolve, toEnumeratedType, toEnumeratedType, toEnumeratedType, toString, validateFriendship
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

CLASS_RESOURCE

private static final String CLASS_RESOURCE
See Also:
Constant Field Values

valueSet

private static final EnumeratedType[] valueSet

localeSets

private static Hashtable localeSets

INWORK

public static final State INWORK
Static final constant

Supported API: true


UNDERREVIEW

public static final State UNDERREVIEW
Static final constant

Supported API: true


RELEASED

public static final State RELEASED
Static final constant

Supported API: true


DROPPED

public static final State DROPPED
Static final constant

Supported API: false

Constructor Detail

State

protected State()
Used by sub-classes that need a default constructor.

Supported API: false

Method Detail

newState

public static State newState(int secretHandshake)
                      throws IllegalAccessException
Used by EnumeratedType for constructing instances of State, from a resource bundle.

Supported API: false

Parameters:
secretHandshake -
Returns:
State
Throws:
IllegalAccessException

toState

public static State toState(String internal_value)
                     throws WTInvalidParameterException
Returns the State instance for the internal_value argument.

Supported API: true

Parameters:
internal_value - The internal (persistent) value for a valid instance of State.
Returns:
State
Throws:
WTInvalidParameterException

getStateDefault

public static State getStateDefault()
Returns the default value (instance) for the State set.

Supported API: true

Returns:
State

getStateSet

public static State[] getStateSet()
Returns a copy of the set of valid values (instances) for the State class.

Supported API: true

Returns:
State[]

getValueSet

public EnumeratedType[] getValueSet()
Returns a copy of the set of valid values (instances) for this instance, for the current user locale.

Supported API: true

Specified by:
getValueSet in class EnumeratedType
Returns:
EnumeratedType[]

valueSet

protected EnumeratedType[] valueSet()
Returns a reference to the set of valid values (instances) for this instance.

Supported API: false

Specified by:
valueSet in class EnumeratedType
Returns:
EnumeratedType[]

getLocaleSet

protected EnumeratedType[] getLocaleSet(Locale locale)
Returns the set of values (instances) for this instance, for the specified locale.

Supported API: false

Specified by:
getLocaleSet in class EnumeratedType
Parameters:
locale -
Returns:
EnumeratedType[]

initializeLocaleSet

private static EnumeratedType[] initializeLocaleSet(Locale locale)
                                             throws Throwable
Parameters:
locale -
Returns:
EnumeratedType[]
Throws:
Throwable