com.atlassian.confluence.spring.transaction.interceptor
Class ConfluenceSpringHostContextAccessor

java.lang.Object
  extended by com.atlassian.sal.spring.component.SpringHostContextAccessor
      extended by com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor
All Implemented Interfaces:
TransactionalHostContextAccessor, com.atlassian.sal.spi.HostContextAccessor, org.springframework.context.ApplicationContextAware

public class ConfluenceSpringHostContextAccessor
extends com.atlassian.sal.spring.component.SpringHostContextAccessor
implements TransactionalHostContextAccessor


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.spring.transaction.interceptor.TransactionalHostContextAccessor
TransactionalHostContextAccessor.Permission, TransactionalHostContextAccessor.Propagation
 
Nested classes/interfaces inherited from interface com.atlassian.sal.spi.HostContextAccessor
com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T>
 
Constructor Summary
ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager)
           
 
Method Summary
<T> T
doInTransaction(TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
          Runs an action in a transaction and returns a optional value.
<T> T
doInTransaction(TransactionalHostContextAccessor.Propagation propagation, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
          Runs an action in a transaction and returns a optional value.
<T> T
doInTransaction(TransactionalHostContextAccessor.Propagation propagation, TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
          Runs an action in a transaction and returns a optional value.
 
Methods inherited from class com.atlassian.sal.spring.component.SpringHostContextAccessor
doInTransaction, getComponentsOfType, getTransactionDefinition, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.sal.spi.HostContextAccessor
doInTransaction, getComponentsOfType
 

Constructor Detail

ConfluenceSpringHostContextAccessor

public ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager)
Method Detail

doInTransaction

public <T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation,
                             com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
Description copied from interface: TransactionalHostContextAccessor
Runs an action in a transaction and returns a optional value.

Specified by:
doInTransaction in interface TransactionalHostContextAccessor
Parameters:
propagation - the propagation mode to use
callback - The callback class to execute
Returns:
Optional result of the operation. May be null

doInTransaction

public <T> T doInTransaction(TransactionalHostContextAccessor.Permission permission,
                             com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
Description copied from interface: TransactionalHostContextAccessor
Runs an action in a transaction and returns a optional value. The transaction is TransactionalHostContextAccessor.Propagation.REQUIRED.

Specified by:
doInTransaction in interface TransactionalHostContextAccessor
Parameters:
permission - if TransactionalHostContextAccessor.Permission.READ_ONLY, attempt to use a read only transaction
callback - The callback class to execute
Returns:
Optional result of the operation. May be null

doInTransaction

public <T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation,
                             TransactionalHostContextAccessor.Permission permission,
                             com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
Description copied from interface: TransactionalHostContextAccessor
Runs an action in a transaction and returns a optional value.

Specified by:
doInTransaction in interface TransactionalHostContextAccessor
Parameters:
propagation - the propagation mode to use
permission - if TransactionalHostContextAccessor.Permission.READ_ONLY, attempt to use a read only transaction
callback - The callback class to execute
Returns:
Optional result of the operation. May be null


Copyright © 2003-2014 Atlassian. All Rights Reserved.