public class ConfluenceSpringHostContextAccessor extends com.atlassian.sal.spring.component.SpringHostContextAccessor implements TransactionalHostContextAccessor
TransactionalHostContextAccessor.Permission, TransactionalHostContextAccessor.Propagation
Constructor and Description |
---|
ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager) |
Modifier and Type | Method and Description |
---|---|
<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.
|
doInTransaction, getComponentsOfType, getTransactionDefinition, setApplicationContext
public ConfluenceSpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager)
public <T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor
doInTransaction
in interface TransactionalHostContextAccessor
propagation
- the propagation mode to usecallback
- The callback class to executepublic <T> T doInTransaction(TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor
TransactionalHostContextAccessor.Propagation.REQUIRED
.doInTransaction
in interface TransactionalHostContextAccessor
permission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executepublic <T> T doInTransaction(TransactionalHostContextAccessor.Propagation propagation, TransactionalHostContextAccessor.Permission permission, com.atlassian.sal.spi.HostContextAccessor.HostTransactionCallback<T> callback)
TransactionalHostContextAccessor
doInTransaction
in interface TransactionalHostContextAccessor
propagation
- the propagation mode to usepermission
- if TransactionalHostContextAccessor.Permission.READ_ONLY
, attempt to use a read only transactioncallback
- The callback class to executeCopyright © 2003–2015 Atlassian. All rights reserved.