org.appng.core.repository.config

## Class ApplicationPostProcessor

- java.lang.Object
- - org.appng.core.repository.config.ApplicationPostProcessor

- All Implemented Interfaces:
    org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered

      public class ApplicationPostProcessor
      extends Object
      implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered

  A `BeanFactoryPostProcessor` that configures the `datasource` bean which is of type `DataSource`, but only if the `Application` requires a database.
  Additionally, the `Site` and the `Application` are also registered as beans.
  Author:
    Matthias Müller

- - ### Field Summary

    - ### Fields inherited from interface org.springframework.core.Ordered

      `HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ApplicationPostProcessor(Site site, Application application, DatabaseConnection databaseConnection, org.springframework.cache.CacheManager platformCacheManager, Collection<String> dictionaryNames)` Creates a new `ApplicationPostProcessor` using the given `DatabaseConnection`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getOrder()`
    `void` | `postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)` If this `ApplicationPostProcessor` was created with a non-`null` `DatabaseConnection`, a `DatasourceConfigurer` is configured using that `DatabaseConnection`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ApplicationPostProcessor

          public ApplicationPostProcessor(Site site,
                                          Application application,
                                          DatabaseConnection databaseConnection,
                                          org.springframework.cache.CacheManager platformCacheManager,
                                          Collection<String> dictionaryNames)

      Creates a new `ApplicationPostProcessor` using the given `DatabaseConnection`.
      Parameters:
        `site` - the `Site`
        `application` - the `Application`
        `databaseConnection` - a `DatabaseConnection`, may be `null`.
        `platformCacheManager` - the platform's `CacheManager`
        `dictionaryNames` - the name of the dictionary files that the `Application` uses (see `AbstractResourceBasedMessageSource.setBasenames(String...)`)

  - ### Method Detail

    - #### postProcessBeanFactory

          public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                                      throws org.springframework.beans.BeansException

      If this `ApplicationPostProcessor` was created with a non-`null` `DatabaseConnection`, a `DatasourceConfigurer` is configured using that `DatabaseConnection`. Otherwise, the `datasource` bean gets destroyed.
      Specified by:
        `postProcessBeanFactory` in interface `org.springframework.beans.factory.config.BeanFactoryPostProcessor`
      Throws:
        `org.springframework.beans.BeansException`
      See Also:
        `DatasourceConfigurer`

    - #### getOrder

          public int getOrder()

      Specified by:
        `getOrder` in interface `org.springframework.core.Ordered`

Copyright © 2011–2023 aiticon GmbH. All rights reserved.