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

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


        return helper.getCatalog( "SteelWheelsRoles", PentahoSessionHolder.getSession() );
      }
    } );

    Assert.assertNotNull( mc );
    MondrianSchema ms = mc.getSchema();
    Assert.assertNotNull( ms );
    String[] roleNames = ms.getRoleNames();
    Assert.assertNotNull( roleNames );
    Assert.assertEquals( 2, roleNames.length );
    Assert.assertEquals( "Role1", roleNames[0] );
    Assert.assertEquals( "Role2", roleNames[1] );
  }
View Full Code Here


    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
          String[] roleNames = schema.getRoleNames();
          if ( ( roleNames != null ) && ( roleNames.length > 0 ) ) {
            // Return the roles from the schema
            Arrays.sort( roleNames );
            return roleNames;
          }
View Full Code Here

TOP

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

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.