com.bankframe.fe.statemachine.base
Class RequestContext

java.lang.Object
  extended bycom.bankframe.fe.statemachine.base.RequestContext

public class RequestContext
extends java.lang.Object


Constructor Summary
RequestContext()
          Creates new RequestContext
 
Method Summary
 void addStateMachineProcessingListener(java.util.Collection listeners)
           
 void addStateMachineProcessingListener(StateMachineProcessingListener listener)
           
 void fireStateMachineProcessingEvent(StateMachineProcessingEvent event)
           
 IApplicationManager getApplicationManager()
          Returns the ApplicationManager for the current request.
 StateMachineException getException()
          Getter for property exception.
 java.lang.String getExceptionDescription()
          Getter for property exceptionDescription.
 java.util.Properties getProperties()
          Returns the properties for the current request.
 IRequest getRequest()
          Returns the IRequest for the current request.
 java.lang.String getRequestStateId()
          Returns the stateId that should be considered the source of this request.
 IResponse getResponse()
          Returns the IResponse for the current request.
 IUserSession getUserSession()
          Returns the UserSession for the current request.
 IUserSessionManager getUserSessionManager()
          Returns the UserSessionManager for the current request.
 void removeStateMachineProcessingListener(java.util.Collection listeners)
           
 void removeStateMachineProcessingListener(StateMachineProcessingListener listener)
           
 void setApplicationManager(IApplicationManager applicationManager)
          Sets the ApplicationManager for the current request.
 void setException(StateMachineException exception)
          Setter for property exception.
 void setExceptionDescription(java.lang.String exceptionDescription)
          Setter for property exceptionDescription.
 void setProperties(java.util.Properties properties)
          Sets the Properties for the current request.
 void setRequest(IRequest request)
          Sets the IRequest for the current request.
 void setResponse(IResponse response)
          Sets the IResponse for the current request.
 void setUserSession(IUserSession userSession)
          Sets the UserSession for the current request.
 void setUserSessionManager(IUserSessionManager userSessionManager)
          Sets the UserSessionManager for the current request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestContext

public RequestContext()
Creates new RequestContext

Method Detail

getApplicationManager

public IApplicationManager getApplicationManager()
Returns the ApplicationManager for the current request.

Returns:
An IApplicationManager

getProperties

public java.util.Properties getProperties()
Returns the properties for the current request.

Returns:
The request Properties.

getRequest

public IRequest getRequest()
Returns the IRequest for the current request.

Returns:
An IRequest implementor.

getResponse

public IResponse getResponse()
Returns the IResponse for the current request.

Returns:
An IResponse implementor.

getUserSession

public IUserSession getUserSession()
Returns the UserSession for the current request.

Returns:
An IUserSession.

getUserSessionManager

public IUserSessionManager getUserSessionManager()
Returns the UserSessionManager for the current request.

Returns:
An IUserSessionManager

setApplicationManager

public void setApplicationManager(IApplicationManager applicationManager)
Sets the ApplicationManager for the current request.

Parameters:
applicationManager -

setProperties

public void setProperties(java.util.Properties properties)
Sets the Properties for the current request.

Parameters:
properties -

setRequest

public void setRequest(IRequest request)
Sets the IRequest for the current request.

Parameters:
request -

setResponse

public void setResponse(IResponse response)
Sets the IResponse for the current request.

Parameters:
response -

setUserSession

public void setUserSession(IUserSession userSession)
Sets the UserSession for the current request.

Parameters:
userSession -

setUserSessionManager

public void setUserSessionManager(IUserSessionManager userSessionManager)
Sets the UserSessionManager for the current request.

Parameters:
userSessionManager -

getRequestStateId

public java.lang.String getRequestStateId()
Returns the stateId that should be considered the source of this request. Up to release 0.3 of JStateMachine, the stateId used as the source was taken only from the IRequest object. Now it is possible to take the source stateId from either the request or the user session. If the user session is used, the source stateId will be the state last visited by the user. This may be different from the stateId in the request. (Think: browser back button...)

The decision on whether to use the request or user session is made by the property 'com.bankframe.fe.statemachine.base.StateIdSource'. This can have one of four values:


Two important features to note:
If the chosen flag does not yield a valid stateId, the application start state will be used.
You can change this behaviour programmatically from your Controllers by calling the IUserSession.setStateIdSource method.


getException

public StateMachineException getException()
Getter for property exception. exception will be populated by the RequestManager if and when it catches a StateMachineException.

Not the difference between this and getExceptionDescription: It is possible to reach an exception condition without catching a StateMachineException. This property will be filled only if an exception is caught. The exceptionDescription property may be filled without an exception being caught.

Returns:
Value of property exception.

setException

public void setException(StateMachineException exception)
Setter for property exception.

Parameters:
exception - New value of property exception.

getExceptionDescription

public java.lang.String getExceptionDescription()
Getter for property exceptionDescription. exceptionDescription will be populated by the RequestManager if and when it encounters an exception condition.

Returns:
Value of property exceptionDescription.
See Also:
getException

setExceptionDescription

public void setExceptionDescription(java.lang.String exceptionDescription)
Setter for property exceptionDescription.

Parameters:
exceptionDescription - New value of property exceptionDescription.

addStateMachineProcessingListener

public void addStateMachineProcessingListener(StateMachineProcessingListener listener)

removeStateMachineProcessingListener

public void removeStateMachineProcessingListener(StateMachineProcessingListener listener)

addStateMachineProcessingListener

public void addStateMachineProcessingListener(java.util.Collection listeners)

removeStateMachineProcessingListener

public void removeStateMachineProcessingListener(java.util.Collection listeners)

fireStateMachineProcessingEvent

public void fireStateMachineProcessingEvent(StateMachineProcessingEvent event)


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