public interface CurrentTenantService extends Service
Modifier and Type | Method and Description |
---|---|
TenantId |
getCurrentTenantId()
Returns the tenant to use for all data access in the current context.
|
TenantId |
getSharedTenantId()
Returns the marker tenant to use for all data access shared across all tenants.
|
boolean |
isMultiTenant()
Returns true if the service implementation supports multiple tenants.
|
<T> T |
runAsTenant(TenantId tenantId,
Callable<T> action)
Runs the given action in the context of the specified tenant.
|
void |
runAsTenant(TenantId tenantId,
Runnable action)
Runs the given action in the context of the specified tenant.
|
TenantId getCurrentTenantId()
TenantId getSharedTenantId()
boolean isMultiTenant()
void runAsTenant(TenantId tenantId, Runnable action)
tenantId
- the tenant id to applyaction
- the action to executeCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.