com.bankframe.fe.statemachine.base.sessionmanagers
Interface IUserSession

All Known Subinterfaces:
IUserSession
All Known Implementing Classes:
UserSession, UserSession

public interface IUserSession


Field Summary
static int STATE_ID_SOURCE_REQUEST
           
static int STATE_ID_SOURCE_REQUEST_THEN_SESSION
           
static int STATE_ID_SOURCE_SESSION
           
static int STATE_ID_SOURCE_SESSION_THEN_REQUEST
           
static int STATE_ID_SOURCE_UNDEFINED
           
 
Method Summary
 void addAuthToken(java.lang.String authToken)
          Adds an authentication token to this user session.
 void addStateVisit(IState state, IResponseData responseData)
          Records a new state visit, adding it to the history of this session.
 IStateVisit getHistory(IState state)
          Returns the most recent state visit which contains an immediate child of the given state.
 IStateVisit getHistoryStar(IState state)
          Returns the most recent state visit which contains a child of the given state.
 java.lang.String getId()
          The sessionId for this session.
 java.util.Locale getLocale()
          Gets the Locale to be used with this UserSession.
 IStateVisit getMostRecentVisit()
          Returns the most recently added StateVisit.
 ISessionData getSessionData()
          Returns the SessionData associated with this UserSession.
 int getStateIdSource()
          Returns the stateIdSource to be used with this user session.
 boolean hasAllAuthTokens(java.util.Collection tokens)
          Determines whether this user session has all the given authentication tokens.
 boolean hasAuthToken(java.lang.String authToken)
          Determines whether this user session has a given authentication token.
 void removeAllAuthTokens()
          Removes all authTokens from this user session.
 void removeAuthToken(java.lang.String authToken)
          Removes an authentication token from this user session.
 void setLocale(java.util.Locale locale)
          Sets the Locale to be used with this UserSession.
 void setStateIdSource(int stateIdSource)
          Sets the stateIdSource to be used with this user session.
 boolean wasStateVisited(IState state)
          Determines whether the given state has been visited in this session.
 

Field Detail

STATE_ID_SOURCE_UNDEFINED

public static final int STATE_ID_SOURCE_UNDEFINED
See Also:
Constant Field Values

STATE_ID_SOURCE_REQUEST

public static final int STATE_ID_SOURCE_REQUEST
See Also:
Constant Field Values

STATE_ID_SOURCE_SESSION

public static final int STATE_ID_SOURCE_SESSION
See Also:
Constant Field Values

STATE_ID_SOURCE_REQUEST_THEN_SESSION

public static final int STATE_ID_SOURCE_REQUEST_THEN_SESSION
See Also:
Constant Field Values

STATE_ID_SOURCE_SESSION_THEN_REQUEST

public static final int STATE_ID_SOURCE_SESSION_THEN_REQUEST
See Also:
Constant Field Values
Method Detail

getHistory

public IStateVisit getHistory(IState state)
Returns the most recent state visit which contains an immediate child of the given state.

If no such state visit exists, this method returns an IStateVisit that contains the given state and an empty IResponseData.

Parameters:
state - the state being entered
Returns:
the appropriate state visit, or an IStateVisit containing the given IState and an empty IResponseData.

getHistoryStar

public IStateVisit getHistoryStar(IState state)
Returns the most recent state visit which contains a child of the given state.

If no such state visit exists, this method returns an IStateVisit that contains the given state and an empty IResponseData.

Parameters:
state - the state being visited
Returns:
the appropriate state visit, or an IStateVisit containing the given IState and an empty IResponseData.

getId

public java.lang.String getId()
The sessionId for this session.

Returns:
the sessionId for this session.

addStateVisit

public void addStateVisit(IState state,
                          IResponseData responseData)
Records a new state visit, adding it to the history of this session.

Parameters:
state - the state being visited
responseData - the response data being given to the view

addAuthToken

public void addAuthToken(java.lang.String authToken)
Adds an authentication token to this user session.

Parameters:
authToken - the token to add.

removeAuthToken

public void removeAuthToken(java.lang.String authToken)
Removes an authentication token from this user session. If this session does not contain this token, take no action.

Parameters:
authToken - the token to remove.

removeAllAuthTokens

public void removeAllAuthTokens()
Removes all authTokens from this user session.


hasAuthToken

public boolean hasAuthToken(java.lang.String authToken)
Determines whether this user session has a given authentication token.

Returns:
true iff this user session contains the given authentication token.

hasAllAuthTokens

public boolean hasAllAuthTokens(java.util.Collection tokens)
Determines whether this user session has all the given authentication tokens. This may be implemented by iterating through the tokens collection and calling hasAuthToken, but there is probably a better way...

Returns:
true iff this user session contains all the given authentication tokens.

getMostRecentVisit

public IStateVisit getMostRecentVisit()
Returns the most recently added StateVisit.

Returns:
the most recent StateVisit.

getStateIdSource

public int getStateIdSource()
Returns the stateIdSource to be used with this user session.

Returns:
stateIdSource

setStateIdSource

public void setStateIdSource(int stateIdSource)
Sets the stateIdSource to be used with this user session.

Parameters:
stateIdSource -

wasStateVisited

public boolean wasStateVisited(IState state)
Determines whether the given state has been visited in this session.

Parameters:
state -
Returns:
true iff the given state has been visited.

getSessionData

public ISessionData getSessionData()
Returns the SessionData associated with this UserSession.

Returns:
sessionData.

setLocale

public void setLocale(java.util.Locale locale)
Sets the Locale to be used with this UserSession.

Parameters:
locale -

getLocale

public java.util.Locale getLocale()
Gets the Locale to be used with this UserSession.

Returns:
locale


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