org.pentaho.platform.plugin.action.mondrian.catalog
Class MondrianCatalogHelper

java.lang.Object
  extended by org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper
All Implemented Interfaces:
IMondrianCatalogService

public class MondrianCatalogHelper
extends Object
implements IMondrianCatalogService

Reads in file containing Mondrian data sources and catalogs. (Contains code copied from XmlaServlet.)

Author:
mlowery

Constructor Summary
MondrianCatalogHelper()
           
 
Method Summary
 void addCatalog(MondrianCatalog catalog, boolean overwrite, IPentahoSession pentahoSession)
          Adds to the global catalog list and possibly persists this information.
static int addToCatalog(String baseUrl, boolean enableXmla, String schemaSolutionPath, IPentahoSession session, String jndiName, boolean overwrite)
           
 MondrianCatalog getCatalog(String name, IPentahoSession pentahoSession)
          Returns the catalog with the given name or null if name not recognized.
 String getDataSourcesConfig()
           
static MondrianCatalogHelper getInstance()
           
 boolean isUseSchemaNameAsCatalogName()
           
 List<MondrianCatalog> listCatalogs(IPentahoSession pentahoSession, boolean jndiOnly)
          Lists all catalogs (filtered according to access control rules).
 MondrianSchema loadMondrianSchema(String solutionLocation, IPentahoSession pentahoSession)
          this method loads a mondrian schema
 void setDataSourcesConfig(String dataSourcesConfig)
           
 void setUseSchemaNameAsCatalogName(boolean useSchemaNameAsCatalogName)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MondrianCatalogHelper

public MondrianCatalogHelper()
Method Detail

getInstance

public static MondrianCatalogHelper getInstance()

getDataSourcesConfig

public String getDataSourcesConfig()

setDataSourcesConfig

public void setDataSourcesConfig(String dataSourcesConfig)

listCatalogs

public List<MondrianCatalog> listCatalogs(IPentahoSession pentahoSession,
                                          boolean jndiOnly)
Description copied from interface: IMondrianCatalogService
Lists all catalogs (filtered according to access control rules).

Specified by:
listCatalogs in interface IMondrianCatalogService
jndiOnly - return only JNDI-based catalogs

addCatalog

public void addCatalog(MondrianCatalog catalog,
                       boolean overwrite,
                       IPentahoSession pentahoSession)
                throws MondrianCatalogServiceException
Description copied from interface: IMondrianCatalogService
Adds to the global catalog list and possibly persists this information.

Specified by:
addCatalog in interface IMondrianCatalogService
overwrite - true to overwrite existing catalog (based on match with definition and effectiveDataSourceInfo
Throws:
MondrianCatalogServiceException

getCatalog

public MondrianCatalog getCatalog(String name,
                                  IPentahoSession pentahoSession)
Description copied from interface: IMondrianCatalogService
Returns the catalog with the given name or null if name not recognized.

Specified by:
getCatalog in interface IMondrianCatalogService
Parameters:
name - of the catalog to fetch

loadMondrianSchema

public MondrianSchema loadMondrianSchema(String solutionLocation,
                                         IPentahoSession pentahoSession)
this method loads a mondrian schema

Specified by:
loadMondrianSchema in interface IMondrianCatalogService
Parameters:
solutionLocation - location of the schema
pentahoSession - current session object
Returns:
Mondrian Schema object.

isUseSchemaNameAsCatalogName

public boolean isUseSchemaNameAsCatalogName()

setUseSchemaNameAsCatalogName

public void setUseSchemaNameAsCatalogName(boolean useSchemaNameAsCatalogName)

addToCatalog

public static int addToCatalog(String baseUrl,
                               boolean enableXmla,
                               String schemaSolutionPath,
                               IPentahoSession session,
                               String jndiName,
                               boolean overwrite)