Package org.saiku.plugin

Source Code of org.saiku.plugin.CustomRole

package org.saiku.plugin;

import java.sql.SQLException;

import mondrian.rolap.RolapConnection;

import org.olap4j.OlapConnection;
import org.saiku.datasources.connection.IConnectionProcessor;
import org.saiku.datasources.connection.ISaikuConnection;

public class CustomRole implements IConnectionProcessor {

  public ISaikuConnection process(ISaikuConnection con) {
    if (con != null
        && ISaikuConnection.OLAP_DATASOURCE.equals(con.getDatasourceType())
        && con.getConnection() instanceof OlapConnection)
    {
      OlapConnection olapCon = (OlapConnection) con.getConnection();
      try {
        RolapConnection rCon = olapCon.unwrap(RolapConnection.class);
      } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      //rCon.setRole(myCustomRoleImplementation);
     
    }
   
    return con;
  }

}
TOP

Related Classes of org.saiku.plugin.CustomRole

TOP
Copyright © 2018 www.massapi.com. 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.