Class Tenant
java.lang.Object
com.broadleafcommerce.tenant.domain.Tenant
- All Implemented Interfaces:
Serializable
Represents the distinct, completely independent operators within these services. Tenants share
the same infrastructure, but should never share data.
For example, two companies might each have a tenant in one hosted Broadleaf instance, but their business is entirely isolated from each other.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
List ofCurrencies
that are available to be selected for use with this tenant.List ofLocales
that are available to be selected for this tenant.Arbitrary attributes associated with this tenant.TheCurrency
that this tenant, by default, assumes all data is within and can drive the default currency selection on a frontend.getId()
The tenant identifier, which might be the same as the database primary key.Defines the type of the tenant resolution identifier: Whether a domain or a domain prefix.Determines how tenants are resolved using all or part of their domains or hostnames.The asset information for the tenant's logo.getName()
The general name for the tenantint
hashCode()
void
setAllowedCurrencies
(List<Currency> allowedCurrencies) List ofCurrencies
that are available to be selected for use with this tenant.void
setAllowedLocales
(List<Locale> allowedLocales) List ofLocales
that are available to be selected for this tenant.void
setAttributes
(Map<String, Object> attributes) Arbitrary attributes associated with this tenant.void
setDefaultCurrency
(Currency defaultCurrency) TheCurrency
that this tenant, by default, assumes all data is within and can drive the default currency selection on a frontend.void
setDefaultLocale
(Locale defaultLocale) void
The tenant identifier, which might be the same as the database primary key.void
setIdentifierType
(String identifierType) Defines the type of the tenant resolution identifier: Whether a domain or a domain prefix.void
setIdentifierValue
(String identifierValue) Determines how tenants are resolved using all or part of their domains or hostnames.void
setLogoAsset
(TenantAsset logoAsset) The asset information for the tenant's logo.void
The general name for the tenanttoString()
-
Constructor Details
-
Tenant
public Tenant() -
Tenant
-
-
Method Details
-
getId
The tenant identifier, which might be the same as the database primary key.- Returns:
- Identifier for the tenant
-
getName
The general name for the tenant- Returns:
- The general name for the tenant
-
getIdentifierType
Defines the type of the tenant resolution identifier: Whether a domain or a domain prefix.- Returns:
- the type of the tenant resolution identifier: Whether a domain or a domain prefix.
- See Also:
-
ResolutionIdentifierType
-
getIdentifierValue
Determines how tenants are resolved using all or part of their domains or hostnames. Values could be themytenant.mycompany.com
inhttps://mytenant.mycompany.com/
or themytenant
inhttps://mytenant.mycompany.com/
depending onidentifierType
.- Returns:
- the domain (a.k.a., hostname) or domain segment identifying this tenant.
- See Also:
-
identifierType
-
getDefaultLocale
TheLocale
that this tenant, by default, assumes all data is within and can drive the defaultLocale
selection as a result.- Returns:
- The default
Locale
as a string.
-
getAllowedLocales
List ofLocales
that are available to be selected for this tenant.- Returns:
- List of
Locales
available for this tenant.
-
getDefaultCurrency
TheCurrency
that this tenant, by default, assumes all data is within and can drive the default currency selection on a frontend. If not set, the system will use the default currency fordefaultLocale
in response to API requests.- Returns:
- The
Currency
that this tenant.
-
getAllowedCurrencies
List ofCurrencies
that are available to be selected for use with this tenant. AllCatalogs
that are related to this tenant should be restricted to this currency set. However, note that this can be empty, in which case, APIs will respond to requests with a list of currencies that the system determines to be the defaults for each locale inallowedLocales
.- Returns:
- List of
Currencies
that are available to be selected for use with this tenant
-
getLogoAsset
The asset information for the tenant's logo. If populated, this property will be used within the admin to display the logo for the tenant-level admin and any applications without aApplication.getLogoAsset()
.- Returns:
- the logo asset, or null
-
getAttributes
Arbitrary attributes associated with this tenant. May include soft references to related entities, custom fields, or other data.- Returns:
- Map of attributes for this tenant
-
setId
The tenant identifier, which might be the same as the database primary key.- Parameters:
id
- Identifier for the tenant
-
setName
The general name for the tenant- Parameters:
name
- The general name for the tenant
-
setIdentifierType
Defines the type of the tenant resolution identifier: Whether a domain or a domain prefix.- Parameters:
identifierType
- the type of the tenant resolution identifier: Whether a domain or a domain prefix.- See Also:
-
ResolutionIdentifierType
-
setIdentifierValue
Determines how tenants are resolved using all or part of their domains or hostnames. Values could be themytenant.mycompany.com
inhttps://mytenant.mycompany.com/
or themytenant
inhttps://mytenant.mycompany.com/
depending onidentifierType
.- Parameters:
identifierValue
- the domain (a.k.a., hostname) or domain segment identifying this tenant.- See Also:
-
identifierType
-
setDefaultLocale
TheLocale
that this tenant, by default, assumes all data is within and can drive the defaultLocale
selection as a result.- Parameters:
defaultLocale
- The defaultLocale
as a string.
-
setAllowedLocales
List ofLocales
that are available to be selected for this tenant.- Parameters:
allowedLocales
- List ofLocales
available for this tenant.
-
setDefaultCurrency
TheCurrency
that this tenant, by default, assumes all data is within and can drive the default currency selection on a frontend. If not set, the system will use the default currency fordefaultLocale
in response to API requests.- Parameters:
defaultCurrency
- TheCurrency
that this tenant
-
setAllowedCurrencies
List ofCurrencies
that are available to be selected for use with this tenant. AllCatalogs
that are related to this tenant should be restricted to this currency set. However, note that this can be empty, in which case, APIs will respond to requests with a list of currencies that the system determines to be the defaults for each locale inallowedLocales
.- Parameters:
allowedCurrencies
- List ofCurrencies
that are available to be selected for use with this tenant
-
setLogoAsset
The asset information for the tenant's logo. If populated, this property will be used within the admin to display the logo for the tenant-level admin and any applications without aApplication.getLogoAsset()
.- Parameters:
logoAsset
- the next logo asset
-
setAttributes
Arbitrary attributes associated with this tenant. May include soft references to related entities, custom fields, or other data.- Parameters:
attributes
- Map of attributes for this tenant
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-