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 TenantConfigWhether 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:TenantConfigWhether the tenant is active.- Specified by:
getActivein interfaceTenantConfig
-
getVisible
Description copied from interface:TenantConfigWhether the tenant is visible in tenant selection box.- Specified by:
getVisiblein interfaceTenantConfig
-
getTenantId
Description copied from interface:TenantConfigThe unique tenant identifier.- Specified by:
getTenantIdin interfaceTenantConfig
-
getTenantName
Description copied from interface:TenantConfigThe display name.- Specified by:
getTenantNamein interfaceTenantConfig
-
getTenantHosts
Description copied from interface:TenantConfigComma separated list of hostnames for which this tenant is valid.- Specified by:
getTenantHostsin interfaceTenantConfig
-
getTenantRoles
Description copied from interface:TenantConfigComma separated list of roles allowed to use this tenant.- Specified by:
getTenantRolesin interfaceTenantConfig
-
getJndiDataSource
Description copied from interface:TenantConfigJNDI data source name.- Specified by:
getJndiDataSourcein interfaceTenantConfig
-
getJdbcDriver
Description copied from interface:TenantConfigThe JDBC driver for the tenant.- Specified by:
getJdbcDriverin interfaceTenantConfig
-
getJdbcUrl
Description copied from interface:TenantConfigThe JDBC connection url for the tenant.- Specified by:
getJdbcUrlin interfaceTenantConfig
-
getJdbcUser
Description copied from interface:TenantConfigThe JDBC user for the tenant.- Specified by:
getJdbcUserin interfaceTenantConfig
-
getJdbcPassword
Description copied from interface:TenantConfigThe JDBC password for the tenant.- Specified by:
getJdbcPasswordin interfaceTenantConfig
-
toString
-