Package com.axelor.db.tenants
Class TenantConfigImpl
- java.lang.Object
-
- com.axelor.db.tenants.TenantConfigImpl
-
- All Implemented Interfaces:
TenantConfig
public class TenantConfigImpl extends Object implements TenantConfig
The default implementation ofTenantConfig
uses configuration provided from axelor-config.properties.The format of axelor-config.properties are as follows:
db.default.visible = false db.default.driver = org.postgresql.Driver db.default.url = jdbc:postgresql://localhost:5432/axelor-db-demo db.default.user = axelor db.default.password = db.company1.name = Company 1 db.company1.driver = org.postgresql.Driver db.company1.url = jdbc:postgresql://localhost:5432/axelor-db1 db.company1.user = axelor db.company1.password = db.company2.name = Company 2 db.company2.driver = org.postgresql.Driver db.company2.url = jdbc:postgresql://localhost:5432/axelor-db2 db.company2.user = axelor db.company2.password =
The format of key name is
db.[tenant-id].[config-name]
-
-
Field Summary
-
Fields inherited from interface com.axelor.db.tenants.TenantConfig
DEFAULT_TENANT_ID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<TenantConfig>
findByHost(Map<String,String> props, String host)
static TenantConfig
findById(Map<String,String> props, String tenantId)
Boolean
getActive()
Whether the tenant is active.String
getJdbcDriver()
The JDBC driver for the tenant.String
getJdbcPassword()
The JDBC password for the tenant.String
getJdbcUrl()
The JDBC connection url for the tenant.String
getJdbcUser()
The JDBC user for the tenant.String
getJndiDataSource()
JNDI data source name.String
getTenantHosts()
Comma separated list of hostnames for which this tenant is valid.String
getTenantId()
The unique tenant identifier.String
getTenantName()
The display name.String
getTenantRoles()
Comma separated list of roles allowed to use this tenant.Boolean
getVisible()
Whether the tenant is visible in tenant selection box.String
toString()
-
-
-
Method Detail
-
findById
public static TenantConfig findById(Map<String,String> props, String tenantId)
-
getActive
public Boolean getActive()
Description copied from interface:TenantConfig
Whether the tenant is active.- Specified by:
getActive
in interfaceTenantConfig
-
getVisible
public Boolean getVisible()
Description copied from interface:TenantConfig
Whether the tenant is visible in tenant selection box.- Specified by:
getVisible
in interfaceTenantConfig
-
getTenantId
public String getTenantId()
Description copied from interface:TenantConfig
The unique tenant identifier.- Specified by:
getTenantId
in interfaceTenantConfig
-
getTenantName
public String getTenantName()
Description copied from interface:TenantConfig
The display name.- Specified by:
getTenantName
in interfaceTenantConfig
-
getTenantHosts
public String getTenantHosts()
Description copied from interface:TenantConfig
Comma separated list of hostnames for which this tenant is valid.- Specified by:
getTenantHosts
in interfaceTenantConfig
-
getTenantRoles
public String getTenantRoles()
Description copied from interface:TenantConfig
Comma separated list of roles allowed to use this tenant.- Specified by:
getTenantRoles
in interfaceTenantConfig
-
getJndiDataSource
public String getJndiDataSource()
Description copied from interface:TenantConfig
JNDI data source name.- Specified by:
getJndiDataSource
in interfaceTenantConfig
-
getJdbcDriver
public String getJdbcDriver()
Description copied from interface:TenantConfig
The JDBC driver for the tenant.- Specified by:
getJdbcDriver
in interfaceTenantConfig
-
getJdbcUrl
public String getJdbcUrl()
Description copied from interface:TenantConfig
The JDBC connection url for the tenant.- Specified by:
getJdbcUrl
in interfaceTenantConfig
-
getJdbcUser
public String getJdbcUser()
Description copied from interface:TenantConfig
The JDBC user for the tenant.- Specified by:
getJdbcUser
in interfaceTenantConfig
-
getJdbcPassword
public String getJdbcPassword()
Description copied from interface:TenantConfig
The JDBC password for the tenant.- Specified by:
getJdbcPassword
in interfaceTenantConfig
-
-