com.bankframe.fe.statemachine.base.apps
Interface IController

All Known Implementing Classes:
AutoViewController, Controller, SimpleController

public interface IController


Method Summary
 void doSideEffects(RequestContext requestContext, IStateTransition transition)
          This method is called by the statemachine after it has determined that the transition to the new state can be made without any errors.
 IStateTransition getResult(RequestContext requestContext, IEvent event)
          Implement this method to choose between the possible state transitions from this event.
 void setControllerProperties(java.util.Properties controllerProperties)
           
 

Method Detail

getResult

public IStateTransition getResult(RequestContext requestContext,
                                  IEvent event)
                           throws StateMachineUserException
Implement this method to choose between the possible state transitions from this event. Typically the decision will be made based on the contents of the request and possibly some interaction with the model. Any data required by the view should be added to the response.

Parameters:
requestContext - the user request context.
event - the event to process.
Returns:
the state transition to follow.
Throws:
StateMachineUserException - can be thrown if an application exception occurs.

doSideEffects

public void doSideEffects(RequestContext requestContext,
                          IStateTransition transition)
                   throws StateMachineUserException
This method is called by the statemachine after it has determined that the transition to the new state can be made without any errors. It is called before the view for the result state is built. It gives you an opportunity to interact with the model before the transition is completed. Note that this does not stop you sending messages to the model in the getResult method.

Parameters:
requestContext - the user request context.
Throws:
StateMachineUserException - can be thrown if an application exception occurs.

setControllerProperties

public void setControllerProperties(java.util.Properties controllerProperties)


Copyright © 2005, 2007, Oracle. All rights reserved.