public class MondrianCatalogHelper extends Object implements IAclAwareMondrianCatalogService
XmlaServlet
.)Modifier and Type | Field and Description |
---|---|
static String |
MONDRIAN_CATALOG_CACHE_REGION |
static String |
MONDRIAN_DATASOURCE_FOLDER |
Constructor and Description |
---|
MondrianCatalogHelper() |
MondrianCatalogHelper(boolean useLegacyDbName) |
MondrianCatalogHelper(org.pentaho.platform.api.repository2.unified.IAclNodeHelper aclHelper)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addCatalog(InputStream inputStream,
MondrianCatalog catalog,
boolean overwriteInRepossitory,
org.pentaho.platform.api.engine.IPentahoSession session)
pass the input stream directly from data access PUC and schema workbench
|
void |
addCatalog(InputStream schemaInputStream,
MondrianCatalog catalog,
boolean overwrite,
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl,
org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
new method to pass the input stream directly from data access put and post schema
|
void |
addCatalog(MondrianCatalog catalog,
boolean overwrite,
org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
use the in memory session value of input stream (used by test harness)
|
static int |
addToCatalog(String baseUrl,
boolean enableXmla,
String schemaSolutionPath,
org.pentaho.platform.api.engine.IPentahoSession session,
String jndiName,
boolean overwrite) |
String |
generateInMemoryDatasourcesXml(org.pentaho.platform.api.repository2.unified.IUnifiedRepository unifiedRepository) |
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl |
getAclFor(String catalogName) |
MondrianCatalog |
getCatalog(String context,
org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
Returns the catalog with the given context - name or definition allowable.
|
MondrianCatalogComplementInfo |
getCatalogComplementInfoMap(String name)
Method to access the MondrianCatalogComplementInfo taken a catalog name.
|
String |
getDataSourcesConfig() |
static MondrianCatalogHelper |
getInstance()
Deprecated.
Please use PentahoSystem.get to get the Mondrian Catalog Service
|
void |
importSchema(File mondrianFile,
String databaseConnection,
String parameters) |
boolean |
isUseSchemaNameAsCatalogName() |
List<MondrianCatalog> |
listCatalogs(org.pentaho.platform.api.engine.IPentahoSession pentahoSession,
boolean jndiOnly)
Lists all catalogs (filtered according to access control rules).
|
MondrianSchema |
loadMondrianSchema(String solutionLocation,
org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
this method loads a mondrian schema
|
void |
reInit(org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
Flushes the catalog cache.
|
void |
removeCatalog(String catalogName,
org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
This method removes a mondrian catalog from the JCR repository.
|
void |
setAclFor(String catalogName,
org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl) |
void |
setDataSourcesConfig(String dataSourcesConfig) |
void |
setUseSchemaNameAsCatalogName(boolean useSchemaNameAsCatalogName) |
public static final String MONDRIAN_DATASOURCE_FOLDER
public static String MONDRIAN_CATALOG_CACHE_REGION
@Deprecated public MondrianCatalogHelper(org.pentaho.platform.api.repository2.unified.IAclNodeHelper aclHelper)
public MondrianCatalogHelper()
public MondrianCatalogHelper(boolean useLegacyDbName)
public static MondrianCatalogHelper getInstance()
public void reInit(org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
IMondrianCatalogService
reInit
in interface IMondrianCatalogService
public String generateInMemoryDatasourcesXml(org.pentaho.platform.api.repository2.unified.IUnifiedRepository unifiedRepository)
public String getDataSourcesConfig()
public void setDataSourcesConfig(String dataSourcesConfig)
public List<MondrianCatalog> listCatalogs(org.pentaho.platform.api.engine.IPentahoSession pentahoSession, boolean jndiOnly)
IMondrianCatalogService
listCatalogs
in interface IMondrianCatalogService
jndiOnly
- return only JNDI-based catalogspublic void addCatalog(MondrianCatalog catalog, boolean overwrite, org.pentaho.platform.api.engine.IPentahoSession pentahoSession) throws MondrianCatalogServiceException
addCatalog
in interface IMondrianCatalogService
overwrite
- true to overwrite existing catalog (based on match with definition and effectiveDataSourceInfoMondrianCatalogServiceException
public void addCatalog(InputStream inputStream, MondrianCatalog catalog, boolean overwriteInRepossitory, org.pentaho.platform.api.engine.IPentahoSession session)
addCatalog
in interface IMondrianCatalogService
public void addCatalog(InputStream schemaInputStream, MondrianCatalog catalog, boolean overwrite, org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl, org.pentaho.platform.api.engine.IPentahoSession pentahoSession) throws MondrianCatalogServiceException
addCatalog
in interface IAclAwareMondrianCatalogService
schemaInputStream
- catalog
- overwrite
- acl
- catalog ACLpentahoSession
- MondrianCatalogServiceException
public void setAclFor(String catalogName, org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl)
setAclFor
in interface IAclAwareMondrianCatalogService
public org.pentaho.platform.api.repository2.unified.RepositoryFileAcl getAclFor(String catalogName)
getAclFor
in interface IAclAwareMondrianCatalogService
public void importSchema(File mondrianFile, String databaseConnection, String parameters)
public MondrianCatalog getCatalog(String context, org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
IMondrianCatalogService
null
if context not
recognized.getCatalog
in interface IMondrianCatalogService
context
- Either the name of the catalog to fetch, or the catalog's definition string
NOTE that the context can be the catalog name or the definition string for the catalog. If you are using
the definition string to retrieve the catalog from the cache, you cannot be guaranteed what datasource is
in play; so under these circumstances, this catalog's definition is the only part of the catalog that can
be trusted. As this feature was added to enable looking up Mondrian roles from the schema, we don't much
care which datasource is in play.public MondrianCatalogComplementInfo getCatalogComplementInfoMap(String name)
name
- Catalog schema locationpublic MondrianSchema loadMondrianSchema(String solutionLocation, org.pentaho.platform.api.engine.IPentahoSession pentahoSession)
loadMondrianSchema
in interface IMondrianCatalogService
solutionLocation
- location of the schemapentahoSession
- current session objectpublic boolean isUseSchemaNameAsCatalogName()
public void setUseSchemaNameAsCatalogName(boolean useSchemaNameAsCatalogName)
public static int addToCatalog(String baseUrl, boolean enableXmla, String schemaSolutionPath, org.pentaho.platform.api.engine.IPentahoSession session, String jndiName, boolean overwrite)
public void removeCatalog(String catalogName, org.pentaho.platform.api.engine.IPentahoSession pentahoSession) throws MondrianCatalogServiceException
removeCatalog
in interface IMondrianCatalogService
catalogName
- the name of the catalog to removepentahoSession
- current session objectMondrianCatalogServiceException