|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.dialog.basic.config.DialogImpl
public final class DialogImpl
DialogImpl
is a basic implementation of Dialog
.
Constructor Summary | |
---|---|
DialogImpl()
|
Method Summary | |
---|---|
void |
addState(State state)
Add the specified State to the State s owned by
this Dialog . |
void |
addTransition(Transition transition)
Add the specified Transition to the global Transition s
associated with this Dialog . |
State |
findState(String id)
Return the specified State , owned by this Dialog ,
if any. |
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()
Return the name of the starting State for this
Dialog . |
Iterator |
getStateIds()
Return an Iterator over the names of State s
that are owned by this Dialog . |
Iterator |
getTransitionOutcomes()
Return an Iterator over the logical outcomes of
global Transition s for this Dialog . |
void |
removeState(State state)
Remove the specified State from the State s owned by
this Dialog , if it is currently registered. |
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)
Set the name of the starting State for this
Dialog . |
String |
toString()
Render a printable version of this instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DialogImpl()
Method Detail |
---|
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 getName()
Return the name of this Dialog
.
getName
in interface Dialog
Dialog
public String getStart()
Return the name of the starting State
for this
Dialog
.
getStart
in interface Dialog
Dialog
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 State findState(String id)
Return the specified State
, owned by this Dialog
,
if any. Otherwise, return null
.
findState
in interface Dialog
id
- Identifier of the requested State
State
specified by the identifier, may be nullpublic 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.
toString
in class Object
public void addState(State state) throws IllegalArgumentException
Add the specified State
to the State
s owned by
this Dialog
.
state
- State
to be added
IllegalArgumentException
- 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 added
IllegalArgumentException
- 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 name
Exception
- if the specified class name cannot be loadedpublic void setName(String name)
Set the name of this Dialog
.
name
- New namepublic void setStart(String start)
public 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 removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |