use of mondrian.spi.DynamicSchemaProcessor in project mondrian by pentaho.
the class DynamicSchemaProcessorTest method testDSPBasics.
/**
* Tests to make sure that our base DynamicSchemaProcessor works, with no
* replacement. Does not test Mondrian is able to connect with the schema
* definition.
*/
public void testDSPBasics() {
DynamicSchemaProcessor dsp = new BaseDsp();
Util.PropertyList dummy = new Util.PropertyList();
String processedSchema = "";
try {
processedSchema = dsp.processSchema("", dummy);
} catch (Exception e) {
// TODO some other assert failure message
assertEquals(0, 1);
}
Assert.assertEquals(TEMPLATE_SCHEMA, processedSchema);
}
use of mondrian.spi.DynamicSchemaProcessor in project pentaho-platform by pentaho.
the class MondrianCatalogHelper method applyDSP.
protected String applyDSP(IPentahoSession ps, String catalogDsInfo, String catalogDefinition) throws Exception {
PropertyList pl = Util.parseConnectString(catalogDsInfo);
String dsp = pl.get(RolapConnectionProperties.DynamicSchemaProcessor.name());
if (dsp != null) {
if (MondrianCatalogHelper.logger.isDebugEnabled()) {
// $NON-NLS-1$
MondrianCatalogHelper.logger.debug("applyDSP: " + dsp);
}
DynamicSchemaProcessor dynProc = ClassResolver.INSTANCE.instantiateSafe(dsp);
pl.put("Locale", getLocale().toString());
return dynProc.processSchema(catalogDefinition, pl);
} else {
return docAtUrlToString(catalogDefinition, ps);
}
}
Aggregations