Package org.pentaho.platform.plugin.action.olap

Examples of org.pentaho.platform.plugin.action.olap.IOlapService


        // 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 );
      }
      return Response.ok().type( MediaType.TEXT_PLAIN ).build();
    } else {
      return Response.status( UNAUTHORIZED ).build();
    }
View Full Code Here


          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() );

    } catch ( PentahoAccessControlException e ) {
      return Response.serverError().entity( e.toString() ).build();
    } catch ( Exception e ) {
      return Response.serverError().entity( e.toString() ).build();
View Full Code Here

        }
      }
    }

    // Check with the IOlapService and try to get a list of roles there.
    IOlapService olapService = PentahoSystem.get( IOlapService.class );
    if ( olapService != null ) {
      MondrianCatalogRepositoryHelper helper =
          new MondrianCatalogRepositoryHelper( PentahoSystem.get( IUnifiedRepository.class ) );
      String serverName = null;
      for ( String name : helper.getOlap4jServers() ) {
        PropertyList props = Util.parseConnectString( helper.getOlap4jServerInfo( name ).URL );
        if ( props.get( RolapConnectionProperties.Catalog.name(), "" ).equals( context ) ) {
          serverName = name;
        }
      }
      if ( serverName != null ) {
        OlapConnection conn = null;
        try {
          // Use a null session for root access.
          conn = olapService.getConnection( serverName, null );
          List<String> roleList = conn.getAvailableRoleNames();
          String[] roleArray = roleList.toArray( new String[roleList.size()] );
          Arrays.sort( roleArray );
          return roleArray;
        } catch ( OlapException e ) {
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.action.olap.IOlapService

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.