@@ -0,0 +1,837 @@
+package org.saiku.plugin;%0A%0Aimport java.sql.SQLException;%0A%0Aimport mondrian.rolap.RolapConnection;%0A%0Aimport org.olap4j.OlapConnection;%0Aimport org.saiku.datasources.connection.IConnectionProcessor;%0Aimport org.saiku.datasources.connection.ISaikuConnection;%0A%0Apublic class CustomRole implements IConnectionProcessor %7B%0A%0A%09public ISaikuConnection process(ISaikuConnection con) %7B%0A%09%09if (con != null %0A%09%09%09%09&& ISaikuConnection.OLAP_DATASOURCE.equals(con.getDatasourceType())%0A%09%09%09%09&& con.getConnection() instanceof OlapConnection) %0A%09%09%7B%0A%09%09%09OlapConnection olapCon = (OlapConnection) con.getConnection();%0A%09%09%09try %7B%0A%09%09%09%09RolapConnection rCon = olapCon.unwrap(RolapConnection.class);%0A%09%09%09%7D catch (SQLException e) %7B%0A%09%09%09%09// TODO Auto-generated catch block%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09%09//rCon.setRole(myCustomRoleImplementation);%0A%09%09%09%0A%09%09%7D%0A%09%09%0A%09%09return con;%0A%09%7D%0A%0A%7D%0A

add customrole example