Class TenantAwareSessionVariableDatasourceService
- java.lang.Object
-
- org.pentaho.platform.engine.services.connection.datasource.dbcp.BaseDatasourceService
-
- org.pentaho.platform.engine.services.connection.datasource.dbcp.NonPooledOrJndiDatasourceService
-
- 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:
org.pentaho.platform.api.data.IDBDatasourceService
,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
-
-
Field Summary
-
Fields inherited from interface org.pentaho.platform.api.data.IDBDatasourceService
ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED, DEFAULT_AUTO_COMMIT, DEFAULT_CATALOG, DEFAULT_READ_ONLY, DEFAULT_TRANSACTION_ISOLATION, IDBDATASOURCE_SERVICE, INITIAL_SIZE, JDBC_DATASOURCE, JDBC_POOL, LOG_ABANDONED, MAX_ACTIVE_KEY, MAX_IDLE_KEY, MAX_OPEN_PREPARED_STATEMENTS, MAX_WAIT_KEY, MIN_IDLE_KEY, POOL_PREPARED_STATEMENTS, QUERY_KEY, REMOVE_ABANDONED, REMOVE_ABANDONED_TIMEOUT, TEST_ON_BORROW, TEST_ON_RETURN, TEST_WHILE_IDLE, TIME_BETWEEN_EVICTION_RUNS_MILLIS, TRANSACTION_ISOLATION_NONE_VALUE
-
-
Constructor Summary
Constructors Constructor Description TenantAwareSessionVariableDatasourceService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
String
getTenantId()
This abstract method must be implemented by subclasses - this should return a string containing the tenant's ID.String
getTenantSessionVariableName()
void
setTenantSessionVariableName(String value)
Getters and Setters-
Methods inherited from class org.pentaho.platform.engine.services.connection.datasource.dbcp.tenantaware.AbstractTenantAwareDatasourceService
getDataSource, getDatasourceNameFormat, isRequireTenantId, setDatasourceNameFormat, setRequireTenantId
-
Methods inherited from class org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledOrJndiDatasourceService
resolveDatabaseConnection
-
Methods inherited from class org.pentaho.platform.engine.services.connection.datasource.dbcp.NonPooledOrJndiDatasourceService
retrieve
-
Methods inherited from class org.pentaho.platform.engine.services.connection.datasource.dbcp.BaseDatasourceService
clearCache, clearDataSource, getCacheManager, getDatasourceMgmtService, getDSBoundName, getDSUnboundName, getJndiDataSource
-
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in classAbstractTenantAwareDatasourceService
- 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 classAbstractTenantAwareDatasourceService
- Returns:
- String ID of the Tenant
-
setTenantSessionVariableName
public void setTenantSessionVariableName(String value)
Getters and Setters
-
getTenantSessionVariableName
public String getTenantSessionVariableName()
-
-