com.atlassian.confluence.spring.transaction.interceptor
Class ConfluenceSpringHostContextAccessor
java.lang.Object
com.atlassian.sal.spring.component.SpringHostContextAccessor
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 classes/interfaces inherited from interface com.atlassian.sal.spi.HostContextAccessor |
com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> |
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 |
ConfluenceSpringHostContextAccessor
public ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager)
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 usecallback
- 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 transactioncallback
- 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 usepermission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to execute
- Returns:
- Optional result of the operation. May be null
Copyright © 2003-2014 Atlassian. All Rights Reserved.