Package org.pentaho.platform.plugin.action.mondrian.catalog

Examples of org.pentaho.platform.plugin.action.mondrian.catalog.IMondrianCatalogService


  public Response flushMondrianSchemaCache() {
    if ( canAdminister() ) {
      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 );
      }
View Full Code Here


      logJobStarted = true;
      importLogger.startJob( importLoggerStream, uploadDir, level );
      importer.importFile( bundle );

      // Flush the Mondrian cache to show imported data-sources.
      IMondrianCatalogService mondrianCatalogService =
          PentahoSystem.get( IMondrianCatalogService.class, "IMondrianCatalogService", PentahoSessionHolder
              .getSession() );
      mondrianCatalogService.reInit( PentahoSessionHolder.getSession() );

      // Flush the IOlapService
      IOlapService olapService =
          PentahoSystem.get( IOlapService.class, "IOlapService", PentahoSessionHolder.getSession() ); //$NON-NLS-1$
      olapService.flushAll( PentahoSessionHolder.getSession() );
View Full Code Here

  public static String getInitialQuery( final Properties properties, final String cubeName, IPentahoSession session )
    throws Throwable {

    // Apply any properties for this catalog specified in datasource.xml
    IMondrianCatalogService mondrianCatalogService =
      PentahoSystem.get( IMondrianCatalogService.class, "IMondrianCatalogService",
        PentahoSessionHolder.getSession() );
    List<MondrianCatalog> catalogs = mondrianCatalogService.listCatalogs( PentahoSessionHolder.getSession(), true );
    String propCat = properties.getProperty( RolapConnectionProperties.Catalog.name() );
    for ( MondrianCatalog cat : catalogs ) {
      if ( cat.getDefinition().equalsIgnoreCase( propCat ) ) {
        Util.PropertyList connectProperties = Util.parseConnectString( cat.getDataSourceInfo() );
        Iterator<Pair<String, String>> iter = connectProperties.iterator();
View Full Code Here

        } else {
          //We create a connection differently so we can ensure that
          //the XMLA servlet shares the same MondrianServer instance as the rest
          //of the platform
          IMondrianCatalogService mcs =
              PentahoSystem.get( IMondrianCatalogService.class );

          MondrianCatalog mc =
              mcs.getCatalog( catalogName, PentahoSessionHolder.getSession() );

          if ( mc == null ) {
            throw new XmlaException(
                CLIENT_FAULT_FC,
                HSB_BAD_RESTRICTION_LIST_CODE,
View Full Code Here

    // first attempt to get the connection metadata from the catalog service. if that is not successful,
    // get the connection using the original approach.

    MdxConnectionAction connAction = (MdxConnectionAction) getActionDefinition();
    String catalogName = connAction.getCatalog().getStringValue();
    IMondrianCatalogService mondrianCatalogService =
        PentahoSystem.get( IMondrianCatalogService.class, "IMondrianCatalogService", PentahoSessionHolder.getSession() ); //$NON-NLS-1$
    MondrianCatalog catalog = mondrianCatalogService.getCatalog( catalogName, PentahoSessionHolder.getSession() );

    if ( catalog == null ) {
      return getConnectionOrig();
    }
View Full Code Here

   * @return Array of role names from the schema file
   */
  protected String[] getMondrianRolesFromCatalog( IPentahoSession userSession, String context ) {
    String[] rtn = null;
    // Get the catalog service
    IMondrianCatalogService catalogService = PentahoSystem.get( IMondrianCatalogService.class );
    if ( catalogService != null ) {
      // Get the catalog by name
      MondrianCatalog catalog = catalogService.getCatalog( context, userSession );
      if ( catalog != null ) {
        // The roles are in the schema object
        MondrianSchema schema = catalog.getSchema();
        if ( schema != null ) {
          // Ask the schema for the role names array
View Full Code Here

  @Facet ( name = "Unsupported" )
  @Produces ( { APPLICATION_JSON, APPLICATION_XML } )
  public List<Cube> getMondrianCatalogs() {
    ArrayList<Cube> cubes = new ArrayList<Cube>();

    IMondrianCatalogService catalogService =
        PentahoSystem.get( IMondrianCatalogService.class, "IMondrianCatalogService", UserConsoleService
            .getPentahoSession() ); //$NON-NLS-1$
    List<MondrianCatalog> catalogs = catalogService.listCatalogs( UserConsoleService.getPentahoSession(), true );

    for ( MondrianCatalog cat : catalogs ) {
      for ( MondrianCube cube : cat.getSchema().getCubes() ) {
        cubes.add( new Cube( cat.getName(), cube.getName(), cube.getId() ) );
      }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.action.mondrian.catalog.IMondrianCatalogService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.