org.pentaho.platform.engine.services.connection.datasource.dbcp.tenantaware
Class TenantAwareSessionVariableDatasourceService
java.lang.Object
org.pentaho.platform.engine.services.connection.datasource.dbcp.BaseDatasourceService
org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledOrJndiDatasourceService
org.pentaho.platform.engine.services.connection.datasource.dbcp.tenantaware.AbstractTenantAwareDatasourceService
org.pentaho.platform.engine.services.connection.datasource.dbcp.tenantaware.TenantAwareSessionVariableDatasourceService
- All Implemented Interfaces:
- IDatasourceService, org.springframework.beans.factory.InitializingBean
public class TenantAwareSessionVariableDatasourceService
- extends AbstractTenantAwareDatasourceService
- implements org.springframework.beans.factory.InitializingBean
This reference implementation retrieves the tenant ID from a variable
in the users' session.
The only option here is the name of the session variable.
- Author:
- mbatchelor
TenantAwareSessionVariableDatasourceService
public TenantAwareSessionVariableDatasourceService()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in class AbstractTenantAwareDatasourceService
- Throws:
Exception
getTenantId
public String getTenantId()
- Description copied from class:
AbstractTenantAwareDatasourceService
- This abstract method must be implemented by subclasses - this should return a
string containing the tenant's ID.
- Specified by:
getTenantId
in class AbstractTenantAwareDatasourceService
- Returns:
- String ID of the Tenant
setTenantSessionVariableName
public void setTenantSessionVariableName(String value)
- Getters and Setters
getTenantSessionVariableName
public String getTenantSessionVariableName()