|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bankframe.fe.statemachine.base.apploaders.State
public abstract class 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. |
Iterator |
getChildren()
Returns an iterator over the immediate children of this state. |
IEvent |
getDefaultEvent()
Returns a default Event for this state. |
IEvent |
getEvent(String name)
Returns the Event with the given name. |
Iterator |
getEvents()
Returns an iterator over all the events that can be thrown from this state. |
IState |
getExceptionState(String exceptionDescription)
Returns a State which can be used if the named exception occurs. |
String |
getId()
Returns this states Id. |
IState |
getParentState()
Returns this state's parent state. |
String |
getTitle()
Returns a descriptive title for this state. |
String |
getTitle(Locale locale)
Returns a descriptive title for this state. |
IUnitOfWork |
getUnitOfWork()
Gets the UnitOfWork which contains this state. |
Properties |
getUserProperties()
Returns a Properties for this state. |
Properties |
getUserProperties(Locale locale)
|
IView |
getView()
Returns the IView implementor for this state. |
IView |
getView(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 IStateevent - 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 IStatesession - the user session to check
public IEvent getDefaultEvent()
IStateMay return null if no default event exists in this state.
getDefaultEvent in interface IStatepublic IEvent getEvent(String name)
IState
getEvent in interface IStatename - the name of the required event.
public IState getExceptionState(String exceptionDescription)
IState
getExceptionState in interface IStateexceptionDescription - the exception which has been thrown to RequestManager
public String getId()
IState
getId in interface IStatepublic IState getParentState()
IState
getParentState in interface IStatepublic IUnitOfWork getUnitOfWork()
IStateMay be null.
getUnitOfWork in interface IStatepublic Properties getUserProperties(Locale locale)
public IView getView(Locale locale)
throws ViewNotFoundException
ViewNotFoundExceptionpublic Iterator getEvents()
getEvents in interface IStatepublic String getTitle(Locale locale)
locale -
public Iterator getChildren()
getChildren in interface IState
public void executeStateCommand(IStateCommand command,
boolean recurse)
throws StateMachineException
executeStateCommand in interface IStatecommand - 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.
StateMachineExceptionpublic String getTitle()
IState
getTitle in interface IStateIState.getTitle()public Properties getUserProperties()
IStateuserProperties can be used to store information about the state of particular interest to your application.
getUserProperties in interface IStateIState.getUserProperties()
public IView getView()
throws ViewNotFoundException
IState
getView in interface IStateViewNotFoundExceptionIState.getView()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||