com.bankframe.fe.statemachine.base.apploaders
Interface IState

All Known Subinterfaces:
IState
All Known Implementing Classes:
State, State, State

public interface IState


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)
          Returns true if the given user session has permission to be in this state.
 void executeStateCommand(IStateCommand command, boolean recurse)
          This method executes the given command on this state and (optionally) all child states.
 java.util.Iterator getChildren()
           
 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.
 IUnitOfWork getUnitOfWork()
          Gets the UnitOfWork which contains this state.
 java.util.Properties getUserProperties()
          Returns a Properties for this state.
 IView getView()
          Returns the IView implementor for this state.
 

Method Detail

getEvent

public IEvent getEvent(java.lang.String name)
Returns the Event with the given name.

Parameters:
name - the name of the required event.
Returns:
the event with the given name

acceptsSession

public boolean acceptsSession(IUserSession session)
Returns true if the given user session has permission to be in this state.

Parameters:
session - the user session attempting to access this state.
Returns:
true if this state can accept this user session.

getExceptionState

public IState getExceptionState(java.lang.String exceptionDescription)
Returns a State which can be used if the named exception occurs. If this state does not have such an exception, this method searches the parent states, back to the root state. If not state has an exception state with the given name, this method returns the root state.

Parameters:
exceptionDescription - the exception which has been thrown to RequestManager
Returns:
the state which should be the result of the exception.

getParentState

public IState getParentState()
Returns this state's parent state.

Returns:
the parent state, or null if this is the root state for this applicaiton.

getId

public java.lang.String getId()
Returns this states Id.

Returns:
id

getTitle

public java.lang.String getTitle()
Returns a descriptive title for this state.

Returns:
title

getUserProperties

public java.util.Properties getUserProperties()
Returns a Properties for this state.

userProperties can be used to store information about the state of particular interest to your application.

Returns:
userProperties

getDefaultEvent

public IEvent getDefaultEvent()
Returns a default Event for this state.

May return null if no default event exists in this state.

Returns:
the default event for this state

getView

public IView getView()
              throws ViewNotFoundException
Returns the IView implementor for this state.

Returns:
view
Throws:
ViewNotFoundException

getUnitOfWork

public IUnitOfWork getUnitOfWork()
Gets the UnitOfWork which contains this state.

May be null.

Returns:
unit of work

acceptsEvent

public boolean acceptsEvent(IEvent event)
Returns trus if the given event is a valid event to be throws from this state.

Parameters:
event - the event to be checked
Returns:
boolean true if the given event can be thrown from this state

getEvents

public java.util.Iterator getEvents()
Returns an iterator over all the events that can be thrown from this state. Note that this does not recurse through parent states.

Returns:
an Iterator over IEvents

executeStateCommand

public void executeStateCommand(IStateCommand command,
                                boolean recurse)
                         throws StateMachineException
This method executes the given command on this state and (optionally) all child states.

Parameters:
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.
Throws:
StateMachineException

getChildren

public java.util.Iterator getChildren()


Copyright © 2004 Siebel Systems, Inc. All rights reserved.