|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.fe.statemachine.base.apploaders.State
Constructor Summary | |
State()
|
Method Summary | |
boolean |
acceptsEvent(IEvent event)
Returns trus if the given event is a valid event to be throws from this state. |
boolean |
acceptsSession(IUserSession session)
This implementation of acceptsSession checks the authTokens contained in the user session against an internal list auth tokens. |
void |
executeStateCommand(IStateCommand command,
boolean recurse)
This method executes the given command on this state and (optionally) all child states. |
java.util.Iterator |
getChildren()
Returns an iterator over the immediate children of this state. |
IEvent |
getDefaultEvent()
Returns a default Event for this state. |
IEvent |
getEvent(java.lang.String name)
Returns the Event with the given name. |
java.util.Iterator |
getEvents()
Returns an iterator over all the events that can be thrown from this state. |
IState |
getExceptionState(java.lang.String exceptionDescription)
Returns a State which can be used if the named exception occurs. |
java.lang.String |
getId()
Returns this states Id. |
IState |
getParentState()
Returns this state's parent state. |
java.lang.String |
getTitle()
Returns a descriptive title for this state. |
java.lang.String |
getTitle(java.util.Locale locale)
Returns a descriptive title for this state. |
IUnitOfWork |
getUnitOfWork()
Gets the UnitOfWork which contains this state. |
java.util.Properties |
getUserProperties()
Returns a Properties for this state. |
java.util.Properties |
getUserProperties(java.util.Locale locale)
|
IView |
getView()
Returns the IView implementor for this state. |
IView |
getView(java.util.Locale locale)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public State()
Method Detail |
public boolean acceptsEvent(IEvent event)
IState
acceptsEvent
in interface IState
event
- the event to be checked
public boolean acceptsSession(IUserSession session)
This method will return ((allRequired || anySufficient) && noForbidden).
In other words, for a session to be accepted it must contain any of this
state's sufficient tokens or all of the required tokens, and must not contain
any forbidden tokens.
acceptsSession
in interface IState
session
- the user session to check
public IEvent getDefaultEvent()
IState
May return null if no default event exists in this state.
getDefaultEvent
in interface IState
public IEvent getEvent(java.lang.String name)
IState
getEvent
in interface IState
name
- the name of the required event.
public IState getExceptionState(java.lang.String exceptionDescription)
IState
getExceptionState
in interface IState
exceptionDescription
- the exception which has been thrown to RequestManager
public java.lang.String getId()
IState
getId
in interface IState
public IState getParentState()
IState
getParentState
in interface IState
public IUnitOfWork getUnitOfWork()
IState
May be null.
getUnitOfWork
in interface IState
public java.util.Properties getUserProperties(java.util.Locale locale)
public IView getView(java.util.Locale locale) throws ViewNotFoundException
ViewNotFoundException
public java.util.Iterator getEvents()
getEvents
in interface IState
public java.lang.String getTitle(java.util.Locale locale)
locale
-
public java.util.Iterator getChildren()
getChildren
in interface IState
public void executeStateCommand(IStateCommand command, boolean recurse) throws StateMachineException
executeStateCommand
in interface IState
command
- an IStateCommand implementor that performs some operation
on states.recurse
- set true if the command is to be executed on the state tree,
or false if the command is to be executed on this state only.
StateMachineException
public java.lang.String getTitle()
IState
getTitle
in interface IState
IState.getTitle()
public java.util.Properties getUserProperties()
IState
userProperties can be used to store information about the state of particular interest to your application.
getUserProperties
in interface IState
IState.getUserProperties()
public IView getView() throws ViewNotFoundException
IState
getView
in interface IState
ViewNotFoundException
IState.getView()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |