Interface Repository

  • All Known Implementing Classes:
    FileRepository, ImplicitRepository

    public interface Repository
    Callback by which a MondrianServer finds its databases, catalogs and schemas.

    An important implementation is ImplicitRepository. This encapsulates the behavior of embedded mondrian: there is no repository, and each connection specifies schema and catalog on the connect string. This is the reason that several methods contain a connection parameter. Other implementations of this interface will probably ignore the connection.

    Author:
    Julian Hyde
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> getCatalogNames​(RolapConnection connection, java.lang.String databaseName)
      Returns a list of catalog names found in the repository.
      OlapConnection getConnection​(MondrianServer server, java.lang.String databaseName, java.lang.String catalogName, java.lang.String roleName, java.util.Properties props)
      Returns an OlapConnection object.
      java.util.List<java.lang.String> getDatabaseNames​(RolapConnection connection)
      Returns a list of database names found in this repository.
      java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getDatabases​(RolapConnection connection)
      Returns a list of databases properties collections, one per database configured on this server.
      java.util.Map<java.lang.String,​RolapSchema> getRolapSchemas​(RolapConnection connection, java.lang.String databaseName, java.lang.String catalogName)
      Must return a map of schema names and schema objects who are children of the specified datasource and catalog.
      void shutdown()
      Shuts down and terminates a repository.
    • Method Detail

      • getDatabaseNames

        java.util.List<java.lang.String> getDatabaseNames​(RolapConnection connection)
        Returns a list of database names found in this repository.
        Parameters:
        connection - A connection object from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.
        Returns:
        A list of database names found in this repository.
      • getCatalogNames

        java.util.List<java.lang.String> getCatalogNames​(RolapConnection connection,
                                                         java.lang.String databaseName)
        Returns a list of catalog names found in the repository.
        Parameters:
        connection - A connection object from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.
        databaseName - The parent database name of which we want to list the catalogs.
        Returns:
        A list of catalog names found in this repository.
      • getRolapSchemas

        java.util.Map<java.lang.String,​RolapSchema> getRolapSchemas​(RolapConnection connection,
                                                                          java.lang.String databaseName,
                                                                          java.lang.String catalogName)
        Must return a map of schema names and schema objects who are children of the specified datasource and catalog.
        Parameters:
        connection - The connection from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.
        databaseName - The database name predicate for the list of returned schemas.
        catalogName - The catalog name predicate for the list of returned schemas.
        Returns:
        A map of schema names associated to schema objects, as found in the repository..
      • getDatabases

        java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> getDatabases​(RolapConnection connection)
        Returns a list of databases properties collections, one per database configured on this server.
        Parameters:
        connection - The connection from which to obtain the metadata. May be null or the Repository implementation itself might ignore it.
        Returns:
        A list of databases properties collections
      • getConnection

        OlapConnection getConnection​(MondrianServer server,
                                     java.lang.String databaseName,
                                     java.lang.String catalogName,
                                     java.lang.String roleName,
                                     java.util.Properties props)
                              throws java.sql.SQLException
        Returns an OlapConnection object.
        Parameters:
        server - The MondrianServer to use.
        databaseName - The database name. Can be null.
        catalogName - The catalog name. Can be null.
        roleName - The role name. Can be null.
        props - Additional connection properties.
        Returns:
        An opened olap connection.
        Throws:
        java.sql.SQLException - If an error is encountered while creating the connection.
      • shutdown

        void shutdown()
        Shuts down and terminates a repository.