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 ofTenantConfiguses 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 TenantConfigfindById(Map<String,String> props, String tenantId)BooleangetActive()Whether the tenant is active.StringgetJdbcDriver()The JDBC driver for the tenant.StringgetJdbcPassword()The JDBC password for the tenant.StringgetJdbcUrl()The JDBC connection url for the tenant.StringgetJdbcUser()The JDBC user for the tenant.StringgetJndiDataSource()JNDI data source name.StringgetTenantHosts()Comma separated list of hostnames for which this tenant is valid.StringgetTenantId()The unique tenant identifier.StringgetTenantName()The display name.StringgetTenantRoles()Comma separated list of roles allowed to use this tenant.BooleangetVisible()Whether the tenant is visible in tenant selection box.StringtoString()
-
-
-
Method Detail
-
findById
public static TenantConfig findById(Map<String,String> props, String tenantId)
-
getActive
public Boolean getActive()
Description copied from interface:TenantConfigWhether the tenant is active.- Specified by:
getActivein interfaceTenantConfig
-
getVisible
public Boolean getVisible()
Description copied from interface:TenantConfigWhether the tenant is visible in tenant selection box.- Specified by:
getVisiblein interfaceTenantConfig
-
getTenantId
public String getTenantId()
Description copied from interface:TenantConfigThe unique tenant identifier.- Specified by:
getTenantIdin interfaceTenantConfig
-
getTenantName
public String getTenantName()
Description copied from interface:TenantConfigThe display name.- Specified by:
getTenantNamein interfaceTenantConfig
-
getTenantHosts
public String getTenantHosts()
Description copied from interface:TenantConfigComma separated list of hostnames for which this tenant is valid.- Specified by:
getTenantHostsin interfaceTenantConfig
-
getTenantRoles
public String getTenantRoles()
Description copied from interface:TenantConfigComma separated list of roles allowed to use this tenant.- Specified by:
getTenantRolesin interfaceTenantConfig
-
getJndiDataSource
public String getJndiDataSource()
Description copied from interface:TenantConfigJNDI data source name.- Specified by:
getJndiDataSourcein interfaceTenantConfig
-
getJdbcDriver
public String getJdbcDriver()
Description copied from interface:TenantConfigThe JDBC driver for the tenant.- Specified by:
getJdbcDriverin interfaceTenantConfig
-
getJdbcUrl
public String getJdbcUrl()
Description copied from interface:TenantConfigThe JDBC connection url for the tenant.- Specified by:
getJdbcUrlin interfaceTenantConfig
-
getJdbcUser
public String getJdbcUser()
Description copied from interface:TenantConfigThe JDBC user for the tenant.- Specified by:
getJdbcUserin interfaceTenantConfig
-
getJdbcPassword
public String getJdbcPassword()
Description copied from interface:TenantConfigThe JDBC password for the tenant.- Specified by:
getJdbcPasswordin interfaceTenantConfig
-
-