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
  • Field Details

  • Constructor Details

    • AbstractInjectableConfluenceSingleContextSpringPersistenceTest

      public AbstractInjectableConfluenceSingleContextSpringPersistenceTest()
  • Method Details

    • configureContainerManager

      @BeforeTransaction public final void configureContainerManager()
    • initBaseUrl

      public final void initBaseUrl()
    • logConnectionPoolState

      public final void logConnectionPoolState()
    • initLicense

      public final void initLicense() throws IOException
      Throws:
      IOException
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.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

      public final DataSource 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

      protected final <T> T doInReadOnlyTransaction(Callable<T> callable)
    • doInReadOnlyTransaction

      protected final <T> T doInReadOnlyTransaction(org.springframework.transaction.support.TransactionCallback<T> callback)
    • loadResource

      public String loadResource(String resourceName) throws IOException
      Throws:
      IOException
    • findAll

      protected <T extends com.atlassian.core.bean.EntityObject> List<T> findAll(Class<T> entityType)
    • deleteAll

      protected <T extends com.atlassian.core.bean.EntityObject> void deleteAll(Class<T> entityType)