Class MondrianAbstractPlatformUserRoleMapper
- java.lang.Object
-
- org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper
-
- All Implemented Interfaces:
org.pentaho.platform.api.engine.IConnectionUserRoleMapper
- Direct Known Subclasses:
MondrianLookupMapUserRoleListMapper
,MondrianOneToOneUserRoleListMapper
,MondrianUserSessionUserRoleListMapper
public abstract class MondrianAbstractPlatformUserRoleMapper extends Object implements org.pentaho.platform.api.engine.IConnectionUserRoleMapper
- Author:
- mbatchelor
-
-
Constructor Summary
Constructors Constructor Description MondrianAbstractPlatformUserRoleMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String[]
getMondrianRolesFromCatalog(org.pentaho.platform.api.engine.IPentahoSession userSession, String context)
This method returns the role names as found in the Mondrian schema.protected String[]
getPlatformRolesFromSession(org.pentaho.platform.api.engine.IPentahoSession session)
This method returns the users' roles as specified in the Spring Security authentication object.String[]
mapConnectionRoles(org.pentaho.platform.api.engine.IPentahoSession userSession, String connectionContext)
Object
mapConnectionUser(org.pentaho.platform.api.engine.IPentahoSession userSession, String context)
protected abstract String[]
mapRoles(String[] mondrianRoles, String[] platformRoles)
Subclasses simply need to implement this one method to do the specific mapping desired.
-
-
-
Method Detail
-
mapRoles
protected abstract String[] mapRoles(String[] mondrianRoles, String[] platformRoles) throws org.pentaho.platform.api.engine.PentahoAccessControlException
Subclasses simply need to implement this one method to do the specific mapping desired.- Parameters:
mondrianRoles
- Sorted list of roles defined in the catalogplatformRoles
- Sorted list of the roles defined in the catalog- Returns:
- Throws:
org.pentaho.platform.api.engine.PentahoAccessControlException
-
getMondrianRolesFromCatalog
protected String[] getMondrianRolesFromCatalog(org.pentaho.platform.api.engine.IPentahoSession userSession, String context)
This method returns the role names as found in the Mondrian schema. The returned names must be ordered (sorted) or code down-stream will not work.- Parameters:
userSession
- Users' sessioncatalogName
- The name of the catalog- Returns:
- Array of role names from the schema file
-
getPlatformRolesFromSession
protected String[] getPlatformRolesFromSession(org.pentaho.platform.api.engine.IPentahoSession session)
This method returns the users' roles as specified in the Spring Security authentication object. The role names returned must be sorted for other code downstream to work properly.- Parameters:
session
- The users' session- Returns:
- Users' roles as defined in the authentication object
-
mapConnectionRoles
public String[] mapConnectionRoles(org.pentaho.platform.api.engine.IPentahoSession userSession, String connectionContext) throws org.pentaho.platform.api.engine.PentahoAccessControlException
- Specified by:
mapConnectionRoles
in interfaceorg.pentaho.platform.api.engine.IConnectionUserRoleMapper
- Throws:
org.pentaho.platform.api.engine.PentahoAccessControlException
-
mapConnectionUser
public Object mapConnectionUser(org.pentaho.platform.api.engine.IPentahoSession userSession, String context) throws org.pentaho.platform.api.engine.PentahoAccessControlException
- Specified by:
mapConnectionUser
in interfaceorg.pentaho.platform.api.engine.IConnectionUserRoleMapper
- Throws:
org.pentaho.platform.api.engine.PentahoAccessControlException
-
-