org.appng.core.controller

## Class PlatformConfig

- java.lang.Object
- - org.appng.core.controller.PlatformConfig

-     @Configuration
       @EnableTransactionManagement
       @ComponentScan(basePackages={"org.appng.core","org.appng.taglib.config"},
                     excludeFilters=)
       @EnableJpaRepositories(repositoryBaseClass=SearchRepositoryImpl.class,
                             basePackages="org.appng.core.repository",
                             entityManagerFactoryRef="entityManagerFactory",
                             transactionManagerRef="coreTxManager")
      public class PlatformConfig
      extends Object

  Central `Configuration` for appNG's platform context.
  Author:
    Matthias Müller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PlatformConfig()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CoreService` | `coreService()`
    `org.springframework.orm.jpa.JpaTransactionManager` | `coreTxManager(javax.persistence.EntityManagerFactory emf)`
    `DatabaseService` | `databaseService()`
    `DataSourceFactory` | `dataSource(String jdbcUrl, String userName, String password, String driverClass, String type, Integer minConnections, Integer maxConnections, Integer maxLifetime, String validationQuery, Integer validationPeriod, Integer validationTimeout, Integer connectionTimeout, boolean logPerformance, boolean autoCommit)`
    `DocumentBuilderFactory` | `documentBuilderFactory()`
    `org.springframework.orm.jpa.support.SharedEntityManagerBean` | `entityManager(javax.persistence.EntityManagerFactory emf)`
    `org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean` | `entityManagerFactory(DataSource dataSource, String dialect)`
    `InitializerService` | `initializerService()`
    `LdapService` | `ldapService()`
    `MarshallService` | `marshallService(DocumentBuilderFactory dbf, TransformerFactory tf)`
    `org.springframework.cache.CacheManager` | `platformCacheManager()`
    `PlatformEventListener` | `platformEventListener()`
    `PlatformTransformer` | `platformTransformer(StyleSheetProvider styleSheetProvider)`
    `RequestProcessor` | `requestProcessor(MarshallService marshallService, PlatformTransformer platformTransformer)`
    `StyleSheetProvider` | `styleSheetProvider(DocumentBuilderFactory dbf, TransformerFactory tf)`
    `TemplateService` | `templateService()`
    `ThymeleafProcessor` | `thymeleafProcessor(DocumentBuilderFactory dbf, MarshallService marshallService)`
    `TransformerFactory` | `transformerFactory()`

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

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

- - ### Constructor Detail

    - #### PlatformConfig

          public PlatformConfig()

  - ### Method Detail

    - #### platformEventListener

          @Bean
          public PlatformEventListener platformEventListener()

    - #### dataSource

          @Bean
          public DataSourceFactory dataSource(@Value(value="${hibernate.connection.url}")
                                                    String jdbcUrl,
                                                    @Value(value="${hibernate.connection.username}")
                                                    String userName,
                                                    @Value(value="${hibernate.connection.password}")
                                                    String password,
                                                    @Value(value="${hibernate.connection.driver_class}")
                                                    String driverClass,
                                                    @Value(value="${database.type}")
                                                    String type,
                                                    @Value(value="${database.minConnections:3}")
                                                    Integer minConnections,
                                                    @Value(value="${database.maxConnections:10}")
                                                    Integer maxConnections,
                                                    @Value(value="${database.maxLifetime:900000}")
                                                    Integer maxLifetime,
                                                    @Value(value="${database.validationQuery:}")
                                                    String validationQuery,
                                                    @Value(value="${database.validationPeriod:}")
                                                    Integer validationPeriod,
                                                    @Value(value="${database.validationTimeout:5000}")
                                                    Integer validationTimeout,
                                                    @Value(value="${database.connectionTimeout:5000}")
                                                    Integer connectionTimeout,
                                                    @Value(value="${database.logPerformance:false}")
                                                    boolean logPerformance,
                                                    @Value(value="${database.autoCommit:true}")
                                                    boolean autoCommit)

    - #### entityManagerFactory

          @Bean
          public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory(DataSource dataSource,
                                                                                                               @Value(value="${hibernate.dialect}")
                                                                                                               String dialect)

    - #### coreTxManager

          @Bean
           @Qualifier(value="coreTxManager")
          public org.springframework.orm.jpa.JpaTransactionManager coreTxManager(javax.persistence.EntityManagerFactory emf)

    - #### entityManager

          @Bean
          public org.springframework.orm.jpa.support.SharedEntityManagerBean entityManager(javax.persistence.EntityManagerFactory emf)

    - #### documentBuilderFactory

          @Bean
          public DocumentBuilderFactory documentBuilderFactory()

    - #### transformerFactory

          @Bean
          public TransformerFactory transformerFactory()
                                                      throws TransformerConfigurationException

      Throws:
        `TransformerConfigurationException`

    - #### styleSheetProvider

          @Bean(initMethod="init")
           @RequestScope(proxyMode=NO)
          public StyleSheetProvider styleSheetProvider(DocumentBuilderFactory dbf,
                                                                                                             TransformerFactory tf)

    - #### marshallService

          @Bean(initMethod="init")
           @Scope(value="prototype")
          public MarshallService marshallService(DocumentBuilderFactory dbf,
                                                                                                     TransformerFactory tf)

    - #### coreService

          @Bean
           @Lazy
          public CoreService coreService()

    - #### databaseService

          @Bean
           @Lazy
          public DatabaseService databaseService()

    - #### templateService

          @Bean
           @Lazy
          public TemplateService templateService()

    - #### initializerService

          @Bean
           @Lazy
          public InitializerService initializerService()

    - #### ldapService

          @Bean
           @Lazy
          public LdapService ldapService()

    - #### thymeleafProcessor

          @Bean
           @RequestScope(proxyMode=NO)
          public ThymeleafProcessor thymeleafProcessor(DocumentBuilderFactory dbf,
                                                                                          MarshallService marshallService)

    - #### platformTransformer

          @Bean
           @Lazy
           @RequestScope(proxyMode=NO)
          public PlatformTransformer platformTransformer(StyleSheetProvider styleSheetProvider)

    - #### requestProcessor

          @Bean
           @RequestScope(proxyMode=NO)
          public RequestProcessor requestProcessor(MarshallService marshallService,
                                                                                      PlatformTransformer platformTransformer)

    - #### platformCacheManager

          @Bean
           @Lazy
          public org.springframework.cache.CacheManager platformCacheManager()

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