Package mondrian.spi

Interface DynamicSchemaProcessor

All Known Implementing Classes:
FilterDynamicSchemaProcessor, LocalizingDynamicSchemaProcessor

public interface DynamicSchemaProcessor
A dynamic schema processor is used to dynamically change a Mondrian schema at runtime.

Mondrian loads a DynamicSchemaProcessor when it sees the RolapConnectionProperties.DynamicSchemaProcessor keyword in a connect string. The value of that property must be a class which implements this interface. Rather than loading the schema directly, Mondrian instantiates the class and calls the processSchema(String, mondrian.olap.Util.PropertyList) method with the catalog URL and connection properties specified in the connect string.

By default, mondrian uses Apache VFS (virtual file system) to resolve catalog URLs. We recommend that implementations of DynamicSchemaProcessor do the same.

If you are writing an implementation of this class, we recommend that you use FilterDynamicSchemaProcessor as a base class.

Author:
hhaas
  • Method Details

    • processSchema

      String processSchema(String schemaUrl, Util.PropertyList connectInfo) throws Exception
      Modifies a Mondrian schema.

      An implementation should generally interpret the URL string as an Apache VFS (virtual file system) URL.

      Parameters:
      schemaUrl - The URL of the catalog.
      connectInfo - Connection properties.
      Returns:
      Returns the modified schema.
      Throws:
      Exception - if an error occurs.
    • processCatalog

      default String processCatalog(String catalog, Util.PropertyList connectInfo) throws Exception
      Modifies a Mondrian catalog.

      An implementation should process catalog and apply dynamic changes

      Parameters:
      catalog - The URL of the catalog.
      connectInfo - Connection properties.
      Returns:
      Returns the modified schema.
      Throws:
      Exception - if an error occurs.