Package it.com.atlassian.confluence
Class AbstractInjectableConfluenceSingleContextSpringPersistenceTest
java.lang.Object
it.com.atlassian.confluence.AbstractInjectableConfluenceSingleContextSpringPersistenceTest
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
AbstractBulkActionTest
,AbstractInjectableStateTest
@ContextConfiguration(initializers={BootstrapTestContextInitializer.class,it.com.atlassian.confluence.ConfluenceAutowireConfigurer.class},
classes=IntegrationTestConfig.class)
@Transactional(isolation=READ_COMMITTED)
@TestExecutionListeners({org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class,org.springframework.test.context.support.DirtiesContextTestExecutionListener.class,org.springframework.test.context.transaction.TransactionalTestExecutionListener.class})
public abstract class AbstractInjectableConfluenceSingleContextSpringPersistenceTest
extends Object
implements org.springframework.context.ApplicationContextAware
A JUnit 4 friendly version of what the old AbstractConfluenceSingleContextSpringPersistenceTest does
- Since:
- 5.7
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
protected <T extends com.atlassian.core.bean.EntityObject>
voidprotected final void
doInIsolatedTransaction
(org.apache.commons.lang3.function.FailableRunnable<?> runnable) protected final <T> T
doInIsolatedTransaction
(org.springframework.transaction.support.TransactionCallback<T> callback) protected final <T> T
doInReadOnlyTransaction
(Callable<T> callable) protected final <T> T
doInReadOnlyTransaction
(org.springframework.transaction.support.TransactionCallback<T> callback) protected final void
doInTransaction
(org.apache.commons.lang3.function.FailableRunnable<?> runnable) protected final <T> T
doInTransaction
(org.springframework.transaction.support.TransactionCallback<T> callback) protected <T extends com.atlassian.core.bean.EntityObject>
List<T>protected final org.springframework.context.ApplicationContext
final DataSource
final org.hibernate.Session
final org.hibernate.SessionFactory
protected final org.springframework.transaction.PlatformTransactionManager
final void
final void
loadResource
(String resourceName) final void
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext)
-
Field Details
-
executorService
-
-
Constructor Details
-
AbstractInjectableConfluenceSingleContextSpringPersistenceTest
public AbstractInjectableConfluenceSingleContextSpringPersistenceTest()
-
-
Method Details
-
configureContainerManager
@BeforeTransaction public final void configureContainerManager() -
initBaseUrl
public final void initBaseUrl() -
logConnectionPoolState
public final void logConnectionPoolState() -
initLicense
- Throws:
IOException
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getSession
public final org.hibernate.Session getSession() -
getApplicationContext
protected final org.springframework.context.ApplicationContext getApplicationContext() -
getTransactionManager
protected final org.springframework.transaction.PlatformTransactionManager getTransactionManager() -
getSessionFactory
public final org.hibernate.SessionFactory getSessionFactory() -
getDataSource
-
doInTransaction
protected final <T> T doInTransaction(org.springframework.transaction.support.TransactionCallback<T> callback) -
doInTransaction
protected final void doInTransaction(org.apache.commons.lang3.function.FailableRunnable<?> runnable) -
doInIsolatedTransaction
protected final void doInIsolatedTransaction(org.apache.commons.lang3.function.FailableRunnable<?> runnable) -
doInIsolatedTransaction
protected final <T> T doInIsolatedTransaction(org.springframework.transaction.support.TransactionCallback<T> callback) -
doInReadOnlyTransaction
-
doInReadOnlyTransaction
protected final <T> T doInReadOnlyTransaction(org.springframework.transaction.support.TransactionCallback<T> callback) -
loadResource
- Throws:
IOException
-
findAll
-
deleteAll
-