use of org.pentaho.platform.repository.solution.filebased.SolutionRepositoryVfsFileObject in project pentaho-platform by pentaho.
the class PentahoXmlaServlet method makeCatalogLocator.
@Override
protected CatalogLocator makeCatalogLocator(ServletConfig servletConfig) {
return new ServletContextCatalogLocator(servletConfig.getServletContext()) {
@Override
public String locate(String catalogPath) {
if (catalogPath.startsWith("mondrian:")) {
// $NON-NLS-1$
try {
FileSystemManager fsManager = VFS.getManager();
SolutionRepositoryVfsFileObject catalog = (SolutionRepositoryVfsFileObject) fsManager.resolveFile(catalogPath);
catalogPath = "solution:" + catalog.getFileRef();
} catch (FileSystemException e) {
logger.error(e.getMessage());
}
} else {
catalogPath = super.locate(catalogPath);
}
return catalogPath;
}
};
}
Aggregations