|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.workstate.core.State
it.amattioli.workstate.core.RealState
public abstract class RealState
Represents a stable state in which a Machine can be after an event
has been received. A real state can have attributes and can execute actions
when entering and exiting it.
| Constructor Summary | |
|---|---|
RealState(MetaRealState metaState,
CompositeState parent)
|
|
| Method Summary | |
|---|---|
protected Map<String,Object> |
addAllAttributes(Map<String,Object> attributes)
Add to the passed map all the attributes that are accessible from this state. |
void |
enter()
Enter this state and activate it. |
boolean |
equals(Object o)
|
void |
exit()
Exit a state and de-activate it. |
Map<String,Object> |
getAllAttributes()
Return a map containing all the attributes accessible from this state. |
Object |
getAttribute(String tag)
Get the value of an attribute accessible to this state. |
Map<String,Object> |
getLocalAttributes()
Return a map containing all the attributes of this state. |
String |
getTag()
Return the tag of this state. |
boolean |
hasAllowedAttribute(String tag)
Check if the passed string is the tag of an attribute that can be accessed by this state. |
boolean |
hasOwnAttribute(String tag)
Check if the passed string is the tag of an attribute that belongs to this state. |
protected void |
reEnter()
Re-enter a state that was exited for exception handling purposes. |
protected void |
reExit()
Re-exit a state that was entered for exception handling purposes. |
void |
restore(StateMemento memento)
|
void |
setAttribute(String tag,
Object value)
Set the value of an attribute accessible from this state. |
String |
toString()
|
| Methods inherited from class it.amattioli.workstate.core.State |
|---|
addAvailableEvents, admitEvent, buildEvent, checkActive, findAncestor, getAvailableEvents, getId, getMemento, getMemento, getParent, getRootMachine, hasMetaState, isActive, isRegion, receiveEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface it.amattioli.workstate.info.Receiver |
|---|
receive |
| Constructor Detail |
|---|
public RealState(MetaRealState metaState,
CompositeState parent)
| Method Detail |
|---|
public String getTag()
public boolean hasAllowedAttribute(String tag)
tag - the attribute tag
public boolean hasOwnAttribute(String tag)
the - attribute tag
public Object getAttribute(String tag)
getAttribute in interface AttributeReadergetAttribute in class Statetag - the attribute tag
IllegalStateException - if this state is not activepublic Map<String,Object> getLocalAttributes()
protected Map<String,Object> addAllAttributes(Map<String,Object> attributes)
public Map<String,Object> getAllAttributes()
getAllAttributes in interface AttributeReadergetAllAttributes in class State
public void setAttribute(String tag,
Object value)
throws WorkflowException
setAttribute in interface AttributeHandlertag - the attribute tagvalue - the new attribute value
IllegalStateException - if the state is not active
IllegalArgumentException - if the passed string is not the tag of an accessible
attribute
WorkflowException
public void enter()
throws WorkflowException
State
enter in class StateWorkflowExceptionprotected void reEnter()
State
reEnter in class State
public void exit()
throws WorkflowException
State
exit in class StateWorkflowExceptionprotected void reExit()
State
reExit in class Statepublic String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class State
public void restore(StateMemento memento)
throws WorkflowException
restore in class StateWorkflowException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||