org.pentaho.platform.plugin.action.mondrian.mapper
Class MondrianAbstractPlatformUserRoleMapper

java.lang.Object
  extended by org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper
All Implemented Interfaces:
IConnectionUserRoleMapper
Direct Known Subclasses:
MondrianLookupMapUserRoleListMapper, MondrianOneToOneUserRoleListMapper, MondrianUserSessionUserRoleListMapper

public abstract class MondrianAbstractPlatformUserRoleMapper
extends Object
implements IConnectionUserRoleMapper

Author:
mbatchelor

Constructor Summary
MondrianAbstractPlatformUserRoleMapper()
           
 
Method Summary
 String[] mapConnectionRoles(IPentahoSession userSession, String connectionContext)
          Provides a mapping from the roles defined for a user, and roles appropriate for the connection Rules: - If the user has no rights to the specified connectionContextName, you must throw PentahoAccessControlException - If null or empty array is returned, then no mapping is required, and connection can use defaults
 Object mapConnectionUser(IPentahoSession userSession, String context)
          Maps the user from the given IPentahoSession into a user (or credential) appropriate for the connection Rules: - If the user has no rights to the specified connectionContextName, you must throw PentahoAccessControlException - If null or empty array is returned, then no mapping is required, and connection can use defaults
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MondrianAbstractPlatformUserRoleMapper

public MondrianAbstractPlatformUserRoleMapper()
Method Detail

mapConnectionRoles

public String[] mapConnectionRoles(IPentahoSession userSession,
                                   String connectionContext)
                            throws PentahoAccessControlException
Description copied from interface: IConnectionUserRoleMapper
Provides a mapping from the roles defined for a user, and roles appropriate for the connection Rules: - If the user has no rights to the specified connectionContextName, you must throw PentahoAccessControlException - If null or empty array is returned, then no mapping is required, and connection can use defaults

Specified by:
mapConnectionRoles in interface IConnectionUserRoleMapper
connectionContext - - The connection name (maybe a datasource name, a catalog, etc)
Returns:
Throws:
PentahoAccessControlException

mapConnectionUser

public Object mapConnectionUser(IPentahoSession userSession,
                                String context)
                         throws PentahoAccessControlException
Description copied from interface: IConnectionUserRoleMapper
Maps the user from the given IPentahoSession into a user (or credential) appropriate for the connection Rules: - If the user has no rights to the specified connectionContextName, you must throw PentahoAccessControlException - If null or empty array is returned, then no mapping is required, and connection can use defaults

Specified by:
mapConnectionUser in interface IConnectionUserRoleMapper
Parameters:
userSession - The users' Session
context - - The connection name (maybe a datasource name, a catalog, etc)
Returns:
Throws:
PentahoAccessControlException