tigase.db.beans

## Class MDRepositoryBean.MDRepositoryConfigBean<A extends DataSourceAware>

- java.lang.Object
- - tigase.db.beans.MDRepositoryBean.MDRepositoryConfigBean<A>

- Type Parameters:
    `A` -
  All Implemented Interfaces:
    ConfigurationChangedAware, Initializable, RegistrarBean, UnregisterAware
  Direct Known Subclasses:
    CounterDataLoggerRepoBean.CounterDataLoggerConfigBean, MsgBroadcastRepository.MsgBroadcastRepositoryBean.MsgBroadcastRepositoryConfigBean, MsgRepository.MsgRepositoryMDBean.MsgRepositoryConfigBean, RepoPool.MessageArchiveRepositoryConfigBean, SeeOtherHostDualIP.DualIPRepositoryWrapper.DualIPRepositoryWrapperConfigBean
  Enclosing class:
    MDRepositoryBean<T extends DataSourceAware>

      public abstract static class MDRepositoryBean.MDRepositoryConfigBean<A extends DataSourceAware>
      extends Object
      implements Initializable, UnregisterAware, ConfigurationChangedAware, RegistrarBean

  MDRepositoryConfigBean is bean responsible for basic management and initialization of repository for domain.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DataSourceBean` | `dataSourceBean`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MDRepositoryConfigBean()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beanConfigurationChanged(Collection<String> changedFields)` Method called when configuration was applied to bean.
    `void` | `beforeUnregister()` Method called before bean unregister.
    `protected String` | `getCls()`
    `protected Class<?>` | `getRepositoryClassName()` Method returns class for instance repository matching data source or returning class specified in `cls` config field.
    `void` | `initialize()` Method will be called, when bean will be created, configured and ready to use.
    `protected void` | `onDataSourceChange(DataSourceBean.DataSourceChangedEvent event)`
    `void` | `register(Kernel kernel)` Method called when bean is being registered allowing developer to programatically register other beans.
    `void` | `setDataSourceAware(A dataSourceAware)`
    `void` | `unregister(Kernel kernel)` Method called while bean is being unregistered.

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

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

- - ### Field Detail

    - #### dataSourceBean

          @Inject
          protected DataSourceBean dataSourceBean

  - ### Constructor Detail

    - #### MDRepositoryConfigBean

          public MDRepositoryConfigBean()

  - ### Method Detail

    - #### beanConfigurationChanged

          public void beanConfigurationChanged(Collection<String> changedFields)

      Description copied from interface: `ConfigurationChangedAware`
      Method called when configuration was applied to bean.
      Specified by:
        `beanConfigurationChanged` in interface `ConfigurationChangedAware`
      Parameters:
        `changedFields` - collection of field names which were changed

    - #### setDataSourceAware

          public void setDataSourceAware(A dataSourceAware)

    - #### register

          public void register(Kernel kernel)

      Description copied from interface: `RegistrarBean`
      Method called when bean is being registered allowing developer to programatically register other beans.
      Specified by:
        `register` in interface `RegistrarBean`
      Parameters:
        `kernel` - - instance from local scope

    - #### unregister

          public void unregister(Kernel kernel)

      Description copied from interface: `RegistrarBean`
      Method called while bean is being unregistered.
      Specified by:
        `unregister` in interface `RegistrarBean`
      Parameters:
        `kernel` - - instance from local scope

    - #### initialize

          public void initialize()

      Description copied from interface: `Initializable`
      Method will be called, when bean will be created, configured and ready to use.
      Specified by:
        `initialize` in interface `Initializable`

    - #### beforeUnregister

          public void beforeUnregister()

      Description copied from interface: `UnregisterAware`
      Method called before bean unregister.
      Specified by:
        `beforeUnregister` in interface `UnregisterAware`

    - #### getRepositoryClassName

          protected Class<?> getRepositoryClassName()
                                             throws DBInitException,
                                                    ClassNotFoundException

      Method returns class for instance repository matching data source or returning class specified in `cls` config field.
      Returns:
      Throws:
        `DBInitException`
        `ClassNotFoundException`

    - #### getCls

          protected String getCls()

    - #### onDataSourceChange

          @HandleEvent
          protected void onDataSourceChange(DataSourceBean.DataSourceChangedEvent event)

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.