IPentahoSession pentahoSession = PentahoSessionHolder.getSession();
if ( SecurityHelper.getInstance().isPentahoAdministrator( pentahoSession ) ) {
// Flush the catalog helper (legacy)
IMondrianCatalogService mondrianCatalogService =
PentahoSystem.get( IMondrianCatalogService.class, "IMondrianCatalogService", pentahoSession ); //$NON-NLS-1$
mondrianCatalogService.reInit( pentahoSession );
// Flush the IOlapService
IOlapService olapService =
PentahoSystem.get( IOlapService.class, "IOlapService", pentahoSession ); //$NON-NLS-1$
olapService.flushAll( pentahoSession );
}