Package com.axelor.db.tenants
Class TenantConfigProviderImpl
- java.lang.Object
-
- com.axelor.db.tenants.TenantConfigProviderImpl
-
- All Implemented Interfaces:
TenantConfigProvider
public class TenantConfigProviderImpl extends Object implements TenantConfigProvider
The defaultTenantConfigProvider
implementation.
-
-
Constructor Summary
Constructors Constructor Description TenantConfigProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TenantConfig
find(String tenantId)
FindTenantConfig
for the given tenant identifier.List<TenantConfig>
findAll(String host)
Find allTenantConfig
for the given hostname.boolean
hasAccess(User user, TenantConfig config)
Check whether the user has permission to use given tenant.
-
-
-
Method Detail
-
find
public TenantConfig find(String tenantId)
Description copied from interface:TenantConfigProvider
FindTenantConfig
for the given tenant identifier.- Specified by:
find
in interfaceTenantConfigProvider
- Parameters:
tenantId
- the tenant identifier- Returns:
- an instance of
TenantConfig
-
findAll
public List<TenantConfig> findAll(String host)
Description copied from interface:TenantConfigProvider
Find allTenantConfig
for the given hostname.- Specified by:
findAll
in interfaceTenantConfigProvider
- Parameters:
host
- the hostname- Returns:
- list of all
TenantConfig
matching the given hostname
-
hasAccess
public boolean hasAccess(User user, TenantConfig config)
Description copied from interface:TenantConfigProvider
Check whether the user has permission to use given tenant.- Specified by:
hasAccess
in interfaceTenantConfigProvider
- Parameters:
user
- the user to checkconfig
- the tenant configuration to check- Returns:
- true if user can user this tenant false otherwise
-
-