Package rs.data.api

Interface IOsgiModelService

All Known Implementing Classes:
OsgiModelServiceImpl

public interface IOsgiModelService
OSGI model service.
Author:
ralph
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String DEFAULT_NAME
    Default factory name ("default")
  • Method Summary

    Modifier and Type Method Description
    org.apache.commons.configuration.HierarchicalConfiguration getConfiguration()
    Returns the configuration with all IDaoFactory settings.
    IDaoFactory getFactory()
    Returns the default factory.
    <T extends IDaoFactory>
    T
    getFactory​(java.lang.Class<T> clazz)
    Returns the factory of the given type.
    IDaoFactory getFactory​(java.lang.String name)
    Returns the factory with given name.
    javax.transaction.TransactionManager getTransactionManager()
    Returns the TransactionManager.
    boolean isRunning()
    Returns whether the model service has started.
    void registerFactory​(java.lang.String name, IDaoFactory factory)
    Registers a new factory.
    void setConfiguration​(org.apache.commons.configuration.HierarchicalConfiguration config)
    Sets the configuration with all IDaoFactory settings.
    void setTransactionManager​(javax.transaction.TransactionManager txManager)
    Sets the TransactionManager.
    boolean stop()
    Shutdown all data factories.
  • Field Details

  • Method Details

    • setConfiguration

      void setConfiguration​(org.apache.commons.configuration.HierarchicalConfiguration config)
      Sets the configuration with all IDaoFactory settings.
      Parameters:
      config - the config to bet set
    • getConfiguration

      org.apache.commons.configuration.HierarchicalConfiguration getConfiguration()
      Returns the configuration with all IDaoFactory settings.
      Returns:
      the main configuration
    • getTransactionManager

      javax.transaction.TransactionManager getTransactionManager()
      Returns the TransactionManager.
      Returns:
      the TransactionManager
    • setTransactionManager

      void setTransactionManager​(javax.transaction.TransactionManager txManager)
      Sets the TransactionManager.
      Parameters:
      txManager - the TransactionManager to set
    • getFactory

      IDaoFactory getFactory()
      Returns the default factory.
      Returns:
      factory
      See Also:
      DEFAULT_NAME
    • getFactory

      IDaoFactory getFactory​(java.lang.String name)
      Returns the factory with given name.
      Parameters:
      name - name of factory
      Returns:
      factory
    • getFactory

      <T extends IDaoFactory> T getFactory​(java.lang.Class<T> clazz)
      Returns the factory of the given type.
      Type Parameters:
      T - the DAO factory class
      Parameters:
      clazz - clazz of factory to be returned
      Returns:
      the factory
    • registerFactory

      void registerFactory​(java.lang.String name, IDaoFactory factory)
      Registers a new factory.
      Parameters:
      name - name of factory
      factory - the factory to register
    • stop

      boolean stop()
      Shutdown all data factories.
      Returns:
      true whenn all factories could be shut down.
    • isRunning

      boolean isRunning()
      Returns whether the model service has started.
      Returns:
      true when service is up and running
      Since:
      1.3.0