|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.dialog.impl.StatusImpl
public class StatusImpl
Class used to record the current status of executing a Dialog
,
plus parent Dialog
s that have executed subordinate Dialog
s
as part of their own processing. Instances are stored in session
scope, so this class MUST be serializable, and
MUST NOT maintain references to application scope
variabes.
Associated with each Status.Position
,
applications have the option to store a reference to a generic
data
object which (because it is referenced by a
Status
object stored in session scope under a well known key),
is conveniently accessible for binding and lookup operations. When a
Status.Position
is popped, the corresponding
data object reference is also released, avoiding the need for the
application to manage "dialog scope" resources itself.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.shale.dialog.Status |
---|
Status.Position |
Constructor Summary | |
---|---|
StatusImpl()
|
Method Summary | |
---|---|
Object |
getData()
Return the data reference (if any) for the current |
String |
getDialogName()
Return the name of the currently executing dialog (if any);
otherwise, return |
String |
getStateName()
Return the name of the currently executing dialog's state
(if any); otherwise, return |
Status.Position |
peek()
Return a |
Status.Position |
pop()
Pop the currently executing |
void |
push(Status.Position position)
Push the specified |
void |
setData(Object data)
Set the data reference for the current |
void |
transition(String stateName)
Transition to the specified state in the currently executing dialog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatusImpl()
Method Detail |
---|
public Object getData()
Return the data reference (if any) for the current Status.Position
.
getData
in interface Status
public void setData(Object data)
Set the data reference for the current Status.Position
.
setData
in interface Status
data
- The new data referencepublic String getDialogName()
Return the name of the currently executing dialog (if any);
otherwise, return null
.
getDialogName
in interface Status
public String getStateName()
Return the name of the currently executing dialog's state
(if any); otherwise, return null
.
getStateName
in interface Status
public Status.Position peek()
Return a Status.Position
representing the currently executing
dialog and state (if any); otherwise, return null
.
peek
in interface Status
public Status.Position pop()
Pop the currently executing Status.Position
and return the
previously executing Status.Position
(if any); otherwise, return
null
.
pop
in interface Status
public void push(Status.Position position)
Push the specified Status.Position
, making it the currently
executing one.
push
in interface Status
position
- The new currently executing Status.Position
public void transition(String stateName)
Transition to the specified state in the currently executing dialog.
transition
in interface Status
stateName
- Name of the new state to be executed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |