public final class DialogImpl extends Object implements Dialog
DialogImpl
is a basic implementation of Dialog
.
Constructor and Description |
---|
DialogImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addState(State state)
|
void |
addTransition(Transition transition)
|
State |
findState(String id)
|
Transition |
findTransition(String outcome)
Return the global
Transition for the specified logical outcome,
if any; otherwise, return null . |
Class |
getDataClass()
Return the class of a JavaBean to be instantiated as the initial
value of the
data property of a newly instantiated
DialogContext . |
String |
getDataClassName()
Return the data class name for the
data property
of a newly instantiated DialogContext . |
String |
getName()
Return the name of this
Dialog . |
String |
getStart()
|
Iterator |
getStateIds()
|
Iterator |
getTransitionOutcomes()
|
void |
removeState(State state)
|
void |
removeTransition(Transition transition)
Remove the specified
Transition from the global
Transition s associated with this Dialog , if it is
currently registered. |
void |
setDataClassName(String dataClassName)
Set the data class name for the
data property
of a newly instantiated DialogContext . |
void |
setName(String name)
Set the name of this
Dialog . |
void |
setStart(String start)
|
String |
toString()
Render a printable version of this instance.
|
public Class getDataClass()
Return the class of a JavaBean to be instantiated as the initial
value of the data
property of a newly instantiated
DialogContext
.
getDataClass
in interface Dialog
data
property of a new instance of this dialogpublic String getStart()
public Iterator getStateIds()
Return an Iterator
over the names of State
s
that are owned by this Dialog
. If there are no such
State
s, an empty Iterator
is returned.
getStateIds
in interface Dialog
Iterator
over all the State
s in this
Dialog
public Iterator getTransitionOutcomes()
Return an Iterator
over the logical outcomes of
global Transition
s for this Dialog
. If there are
no such Transition
s, an empty Iterator
is
returned.
getTransitionOutcomes
in interface Dialog
Iterator
over the logical outcomes of global
Transition
s for this Dialog
public Transition findTransition(String outcome)
Return the global Transition
for the specified logical outcome,
if any; otherwise, return null
.
findTransition
in interface Dialog
outcome
- Logical outcome for which to return a Transition
Transition
for the specified logical outcomepublic String toString()
Render a printable version of this instance.
public void addState(State state) throws IllegalArgumentException
state
- State
to be addedIllegalArgumentException
- if there is already a State
with the specified id
owned by this Dialog
public void addTransition(Transition transition) throws IllegalArgumentException
Add the specified Transition
to the global Transition
s
associated with this Dialog
.
transition
- Transition
to be addedIllegalArgumentException
- if the specified Transition
cannot be added to this State
public String getDataClassName()
Return the data class name for the data
property
of a newly instantiated DialogContext
.
data
property of a new instance of this dialogpublic void setDataClassName(String dataClassName)
Set the data class name for the data
property
of a newly instantiated DialogContext
.
dataClassName
- New data class nameException
- if the specified class name cannot be loadedpublic void removeState(State state)
Remove the specified State
from the State
s owned by
this Dialog
, if it is currently registered. Otherwise,
do nothing.
state
- State
to be removedpublic void removeTransition(Transition transition)
Remove the specified Transition
from the global
Transition
s associated with this Dialog
, if it is
currently registered. Otherwise, do nothing.
transition
- Transition
to be removedCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.