|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.api.client.wfmc.wapi.WMObjectState
public abstract class WMObjectState
Abstract base that represents the state of an object.
Field Summary | |
---|---|
protected int |
_state
The object state code. |
static int |
DEFAULT_INT
Signifies that the object remains in its current state. |
static int |
FORCED_ACTION
Action is illegal to API caller, but is being forced by the engine. |
static int |
ILLEGAL_ACTION
Action is invalid for the current state. |
static int |
NO_ACTION
Action does not cause a state transition. |
Constructor Summary | |
---|---|
|
WMObjectState()
|
protected |
WMObjectState(int state)
Construct a new WMObjectState . |
Method Summary | |
---|---|
int |
checkTransition(int newState,
boolean throwException)
Returns the action required to transition to a specified state. |
int |
checkTransition(WMObjectState newState,
boolean throwException)
Returns the action required to transition to a specified state. |
boolean |
equals(java.lang.Object obj)
Tests for object identity. |
int |
get_state()
|
protected abstract int[] |
getActionsByState()
Returns the transitions from the current state, indexed by new state. |
WMObjectState[] |
getStates()
Returns the list of states to which legal transitions are possible. |
protected abstract int[] |
getStatesByAction()
Returns the transitions from the current state, indexed by action. |
protected abstract java.lang.String[] |
getTags()
Returns the list of all state tags applicable to this instance's class. |
int |
getValue()
JavaBean-compliant property accessor, synonym for value() . |
protected abstract WMObjectState[] |
getValues()
Returns the list of all state values applicable to this instance's class. |
int |
hashCode()
Equal objects must have equal hash codes. |
protected java.lang.Object |
readResolve()
|
void |
set_state(int _state)
|
protected int |
stateFromAction(int action)
Returns the state that would result from a specified action. |
java.lang.String |
stringValue()
Returns the object state as a string. |
java.lang.String |
toString()
|
int |
value()
Returns the object state as an integer. |
protected static WMObjectState |
valueOf(java.lang.String[] tags,
WMObjectState[] values,
java.lang.String state)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_INT
public static final int NO_ACTION
public static final int ILLEGAL_ACTION
public static final int FORCED_ACTION
protected int _state
Constructor Detail |
---|
protected WMObjectState(int state)
WMObjectState
. The array type
parameters are references to arrays statically defined in the
calling subclass.
state
- The integer code for this state.public WMObjectState()
Method Detail |
---|
protected static WMObjectState valueOf(java.lang.String[] tags, WMObjectState[] values, java.lang.String state)
public final WMObjectState[] getStates()
protected final int stateFromAction(int action) throws WMTransitionNotAllowedException
action
- Action code.
WMTransitionNotAllowedException
- if the specified action is
inapplicable to the current state.public final int checkTransition(WMObjectState newState, boolean throwException) throws WMTransitionNotAllowedException
newState
- The new state required.throwException
- Causes an exception to be thrown if the
transition would be illegal.
WMTransitionNotAllowedException
- if a transition from the
current state to the new state would be illegal.public final int checkTransition(int newState, boolean throwException) throws WMTransitionNotAllowedException
newState
- The new state required.throwException
- Causes an exception to be thrown if the
transition would be illegal.
WMTransitionNotAllowedException
- if a transition from the
current state to the new state would be illegal.protected abstract java.lang.String[] getTags()
protected abstract WMObjectState[] getValues()
protected abstract int[] getStatesByAction()
ILLEGAL_ACTION
.
protected abstract int[] getActionsByState()
ILLEGAL_ACTION
.
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The with which to compare object this instance.
true
if the two references point to the
same object.public final int hashCode()
hashCode
in class java.lang.Object
public final int value()
public final int getValue()
value()
.
protected final java.lang.Object readResolve() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public final java.lang.String stringValue()
public final java.lang.String toString()
toString
in class java.lang.Object
public int get_state()
public void set_state(int _state)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |