org.springframework.webflow.execution
Class FlowScopeTokenTransactionSynchronizer

java.lang.Object
  extended by org.springframework.webflow.execution.AbstractTokenTransactionSynchronizer
      extended by org.springframework.webflow.execution.FlowScopeTokenTransactionSynchronizer
All Implemented Interfaces:
TransactionSynchronizer

public class FlowScopeTokenTransactionSynchronizer
extends AbstractTokenTransactionSynchronizer

The default transaction synchronizer implementation. The token will be stored in flow scope for the duration of an application transaction. This implies that there needs to be a unique flow execution for each running application transaction! As a result this transaction synchronizer cannot be used with continuations based flow execution storage strategies.

Author:
Erwin Vervaet

Field Summary
 
Fields inherited from class org.springframework.webflow.execution.AbstractTokenTransactionSynchronizer
TRANSACTION_TOKEN_ATTRIBUTE_NAME, TRANSACTION_TOKEN_PARAMETER_NAME
 
Constructor Summary
FlowScopeTokenTransactionSynchronizer()
           
 
Method Summary
 void clearToken(RequestContext context)
          Clear the token from whatever token storage is being used (e.g the flow scope).
 java.lang.String getToken(RequestContext context)
          Obtain the token value from whatever token storage is being used (e.g.
 void setToken(RequestContext context, java.lang.String token)
          Set given token in whatever token storage is being used (e.g the flow scope).
 
Methods inherited from class org.springframework.webflow.execution.AbstractTokenTransactionSynchronizer
assertInTransaction, beginTransaction, endTransaction, generateToken, getTransactionTokenAttributeName, getTransactionTokenParameterName, inTransaction, isSecure, setSecure, setTransactionTokenAttributeName, setTransactionTokenParameterName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowScopeTokenTransactionSynchronizer

public FlowScopeTokenTransactionSynchronizer()
Method Detail

getToken

public java.lang.String getToken(RequestContext context)
Description copied from class: AbstractTokenTransactionSynchronizer
Obtain the token value from whatever token storage is being used (e.g. from the flow scope).

Specified by:
getToken in class AbstractTokenTransactionSynchronizer
Parameters:
context - the flow execution request context
Returns:
the retreived token, or null if no token could be found

setToken

public void setToken(RequestContext context,
                     java.lang.String token)
Description copied from class: AbstractTokenTransactionSynchronizer
Set given token in whatever token storage is being used (e.g the flow scope).

Specified by:
setToken in class AbstractTokenTransactionSynchronizer
Parameters:
context - the flow execution request context
token - the token value to set

clearToken

public void clearToken(RequestContext context)
Description copied from class: AbstractTokenTransactionSynchronizer
Clear the token from whatever token storage is being used (e.g the flow scope). This will end transactional processing.

Specified by:
clearToken in class AbstractTokenTransactionSynchronizer
Parameters:
context - the flow execution request context


Copyright © 2005. All Rights Reserved.