public class SpringHostContextAccessor extends Object implements HostContextAccessor, org.springframework.context.ApplicationContextAware
HostContextAccessor.HostTransactionCallback<T>| Constructor and Description |
|---|
SpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager) |
| Modifier and Type | Method and Description |
|---|---|
Object |
doInTransaction(HostContextAccessor.HostTransactionCallback callback)
Runs an action in a transaction and returns a optional value.
|
<T> Map<String,T> |
getComponentsOfType(Class<T> iface)
Gets all beans of a given type
|
protected org.springframework.transaction.support.DefaultTransactionDefinition |
getTransactionDefinition() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public SpringHostContextAccessor(org.springframework.transaction.PlatformTransactionManager transactionManager)
public <T> Map<String,T> getComponentsOfType(Class<T> iface)
HostContextAccessorgetComponentsOfType in interface HostContextAccessoriface - The interface to usepublic Object doInTransaction(HostContextAccessor.HostTransactionCallback callback)
HostContextAccessordoInTransaction in interface HostContextAccessorcallback - The callback class to executepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionprotected org.springframework.transaction.support.DefaultTransactionDefinition getTransactionDefinition()
Copyright © 2018 Atlassian. All rights reserved.