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 defaultTenantConfigProviderimplementation.
-
-
Constructor Summary
Constructors Constructor Description TenantConfigProviderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TenantConfigfind(String tenantId)FindTenantConfigfor the given tenant identifier.List<TenantConfig>findAll(String host)Find allTenantConfigfor the given hostname.booleanhasAccess(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:TenantConfigProviderFindTenantConfigfor the given tenant identifier.- Specified by:
findin interfaceTenantConfigProvider- Parameters:
tenantId- the tenant identifier- Returns:
- an instance of
TenantConfig
-
findAll
public List<TenantConfig> findAll(String host)
Description copied from interface:TenantConfigProviderFind allTenantConfigfor the given hostname.- Specified by:
findAllin interfaceTenantConfigProvider- Parameters:
host- the hostname- Returns:
- list of all
TenantConfigmatching the given hostname
-
hasAccess
public boolean hasAccess(User user, TenantConfig config)
Description copied from interface:TenantConfigProviderCheck whether the user has permission to use given tenant.- Specified by:
hasAccessin interfaceTenantConfigProvider- Parameters:
user- the user to checkconfig- the tenant configuration to check- Returns:
- true if user can user this tenant false otherwise
-
-