Package com.axelor.db.tenants
Class TenantConfigImpl
java.lang.Object
com.axelor.db.tenants.TenantConfigImpl
- All Implemented Interfaces:
TenantConfig
The default implementation of
TenantConfig
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
Modifier and TypeMethodDescriptionstatic List
<TenantConfig> static List
<TenantConfig> findByHost
(Map<String, String> props, String host) static TenantConfig
Whether the tenant is active.The JDBC driver for the tenant.The JDBC password for the tenant.The JDBC connection url for the tenant.The JDBC user for the tenant.JNDI data source name.Comma separated list of hostnames for which this tenant is valid.The unique tenant identifier.The display name.Comma separated list of roles allowed to use this tenant.Whether the tenant is visible in tenant selection box.toString()
-
Method Details
-
findAll
-
findByHost
-
findById
-
getActive
Description copied from interface:TenantConfig
Whether the tenant is active.- Specified by:
getActive
in interfaceTenantConfig
-
getVisible
Description copied from interface:TenantConfig
Whether the tenant is visible in tenant selection box.- Specified by:
getVisible
in interfaceTenantConfig
-
getTenantId
Description copied from interface:TenantConfig
The unique tenant identifier.- Specified by:
getTenantId
in interfaceTenantConfig
-
getTenantName
Description copied from interface:TenantConfig
The display name.- Specified by:
getTenantName
in interfaceTenantConfig
-
getTenantHosts
Description copied from interface:TenantConfig
Comma separated list of hostnames for which this tenant is valid.- Specified by:
getTenantHosts
in interfaceTenantConfig
-
getTenantRoles
Description copied from interface:TenantConfig
Comma separated list of roles allowed to use this tenant.- Specified by:
getTenantRoles
in interfaceTenantConfig
-
getJndiDataSource
Description copied from interface:TenantConfig
JNDI data source name.- Specified by:
getJndiDataSource
in interfaceTenantConfig
-
getJdbcDriver
Description copied from interface:TenantConfig
The JDBC driver for the tenant.- Specified by:
getJdbcDriver
in interfaceTenantConfig
-
getJdbcUrl
Description copied from interface:TenantConfig
The JDBC connection url for the tenant.- Specified by:
getJdbcUrl
in interfaceTenantConfig
-
getJdbcUser
Description copied from interface:TenantConfig
The JDBC user for the tenant.- Specified by:
getJdbcUser
in interfaceTenantConfig
-
getJdbcPassword
Description copied from interface:TenantConfig
The JDBC password for the tenant.- Specified by:
getJdbcPassword
in interfaceTenantConfig
-
toString
-