Package tigase.server.amp.db

## Class MsgBroadcastRepository.MsgBroadcastRepositoryBean

- java.lang.Object
- - tigase.db.beans.MDRepositoryBean<T>
  - - tigase.db.beans.MDRepositoryBeanWithStatistics<MsgBroadcastRepository>
    - - tigase.server.amp.db.MsgBroadcastRepository.MsgBroadcastRepositoryBean

- All Implemented Interfaces:
    `DataSourceAware`, `Initializable`, `RegistrarBean`, `RegistrarBeanWithDefaultBeanClass`, `UnregisterAware`, `MsgBroadcastRepositoryIfc`, `ComponentStatisticsProvider`, `StatisticsProviderIfc`
  Enclosing class:
    MsgBroadcastRepository<T,​S extends DataSource>

      @Bean(name="msgBroadcastRepository",
            parent=AmpComponent.class,
            active=true)
      public static class MsgBroadcastRepository.MsgBroadcastRepositoryBean
      extends MDRepositoryBeanWithStatistics<MsgBroadcastRepository>
      implements MsgBroadcastRepositoryIfc

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `MsgBroadcastRepository.MsgBroadcastRepositoryBean.MsgBroadcastRepositoryConfigBean` |

    - ### Nested classes/interfaces inherited from class tigase.db.beans.MDRepositoryBean

      `MDRepositoryBean.MDRepositoryConfigBean<A extends DataSourceAware>, MDRepositoryBean.SelectorType`

  - ### Field Summary

    - ### Fields inherited from class tigase.db.beans.MDRepositoryBean

      `aliases, dataSourceSelection`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MsgBroadcastRepositoryBean()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `dumpBroadcastMessageKeys()` |
    `protected java.lang.Class<? extends MsgBroadcastRepository>` | `findClassForDataSource​(DataSource dataSource)` | Method returns class implementing repository which supports data source instance provided in parameter.
    `java.util.Collection<MsgBroadcastRepository.BroadcastMsg>` | `getBroadcastMessages()` |
    `MsgBroadcastRepository.BroadcastMsg` | `getBroadcastMsg​(java.lang.String id)` |
    `java.lang.Class<?>` | `getDefaultBeanClass()` | Returns default class for all bean which are defined using configuration as subbeans of bean implementing this interface.
    `void` | `loadMessagesToBroadcast()` |
    `void` | `setDataSource​(DataSource dataSource)` | Method called to provide class with instance of a data source.
    `boolean` | `updateBroadcastMessage​(java.lang.String id, Element msg, java.util.Date expire, BareJID recipient)` |

    - ### Methods inherited from class tigase.db.beans.MDRepositoryBeanWithStatistics

      `everyHour, everyMinute, everySecond, getRepositories, getRepository, getStatistics, setStatisticsEnabled, updateDataSourceAware, wrapInProxy`

    - ### Methods inherited from class tigase.db.beans.MDRepositoryBean

      `beforeUnregister, getName, initialize, initializeRepository, onDataSourceChange, register, registerIfNotExists, repositoriesStream, setDataSourceBean, unregister`

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

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

    - ### Methods inherited from interface tigase.stats.ComponentStatisticsProvider

      `belongsTo`

- - ### Constructor Detail

    - #### MsgBroadcastRepositoryBean

          public MsgBroadcastRepositoryBean()

  - ### Method Detail

    - #### setDataSource

          public void setDataSource​(DataSource dataSource)

      Description copied from interface: `DataSourceAware`
      Method called to provide class with instance of a data source.
      Specified by:
        `setDataSource` in interface `DataSourceAware`

    - #### loadMessagesToBroadcast

          public void loadMessagesToBroadcast()

      Specified by:
        `loadMessagesToBroadcast` in interface `MsgBroadcastRepositoryIfc`

    - #### getBroadcastMsg

          public MsgBroadcastRepository.BroadcastMsg getBroadcastMsg​(java.lang.String id)

      Specified by:
        `getBroadcastMsg` in interface `MsgBroadcastRepositoryIfc`

    - #### dumpBroadcastMessageKeys

          public java.lang.String dumpBroadcastMessageKeys()

      Specified by:
        `dumpBroadcastMessageKeys` in interface `MsgBroadcastRepositoryIfc`

    - #### getBroadcastMessages

          public java.util.Collection<MsgBroadcastRepository.BroadcastMsg> getBroadcastMessages()

      Specified by:
        `getBroadcastMessages` in interface `MsgBroadcastRepositoryIfc`

    - #### updateBroadcastMessage

          public boolean updateBroadcastMessage​(java.lang.String id,
                                                Element msg,
                                                java.util.Date expire,
                                                BareJID recipient)

      Specified by:
        `updateBroadcastMessage` in interface `MsgBroadcastRepositoryIfc`

    - #### getDefaultBeanClass

          public java.lang.Class<?> getDefaultBeanClass()

      Description copied from interface: `RegistrarBeanWithDefaultBeanClass`
      Returns default class for all bean which are defined using configuration as subbeans of bean implementing this interface. This allows users to have more convenient configuration file without the need to specify class for each of subbbeans if most of them will have the same class.
      Specified by:
        `getDefaultBeanClass` in interface `RegistrarBeanWithDefaultBeanClass`

    - #### findClassForDataSource

          protected java.lang.Class<? extends MsgBroadcastRepository> findClassForDataSource​(DataSource dataSource)
                                                                                      throws DBInitException

      Description copied from class: `MDRepositoryBean`
      Method returns class implementing repository which supports data source instance provided in parameter.
      Specified by:
        `findClassForDataSource` in class `MDRepositoryBean<MsgBroadcastRepository>`
      Returns:
        repository class
      Throws:
        `DBInitException`