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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanList ofCurrenciesthat are available to be selected for use with this tenant.List ofLocalesthat are available to be selected for this tenant.Arbitrary attributes associated with this tenant.TheCurrencythat 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 tenantinthashCode()voidsetAllowedCurrencies(List<Currency> allowedCurrencies) List ofCurrenciesthat are available to be selected for use with this tenant.voidsetAllowedLocales(List<Locale> allowedLocales) List ofLocalesthat are available to be selected for this tenant.voidsetAttributes(Map<String, Object> attributes) Arbitrary attributes associated with this tenant.voidsetDefaultCurrency(Currency defaultCurrency) TheCurrencythat this tenant, by default, assumes all data is within and can drive the default currency selection on a frontend.voidsetDefaultLocale(Locale defaultLocale) voidThe tenant identifier, which might be the same as the database primary key.voidsetIdentifierType(String identifierType) Defines the type of the tenant resolution identifier: Whether a domain or a domain prefix.voidsetIdentifierValue(String identifierValue) Determines how tenants are resolved using all or part of their domains or hostnames.voidsetLogoAsset(TenantAsset logoAsset) The asset information for the tenant's logo.voidThe 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.cominhttps://mytenant.mycompany.com/or themytenantinhttps://mytenant.mycompany.com/depending onidentifierType.- Returns:
- the domain (a.k.a., hostname) or domain segment identifying this tenant.
- See Also:
-
identifierType
-
getDefaultLocale
TheLocalethat this tenant, by default, assumes all data is within and can drive the defaultLocaleselection as a result.- Returns:
- The default
Localeas a string.
-
getAllowedLocales
List ofLocalesthat are available to be selected for this tenant.- Returns:
- List of
Localesavailable for this tenant.
-
getDefaultCurrency
TheCurrencythat 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 fordefaultLocalein response to API requests.- Returns:
- The
Currencythat this tenant.
-
getAllowedCurrencies
List ofCurrenciesthat are available to be selected for use with this tenant. AllCatalogsthat 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
Currenciesthat 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.cominhttps://mytenant.mycompany.com/or themytenantinhttps://mytenant.mycompany.com/depending onidentifierType.- Parameters:
identifierValue- the domain (a.k.a., hostname) or domain segment identifying this tenant.- See Also:
-
identifierType
-
setDefaultLocale
TheLocalethat this tenant, by default, assumes all data is within and can drive the defaultLocaleselection as a result.- Parameters:
defaultLocale- The defaultLocaleas a string.
-
setAllowedLocales
List ofLocalesthat are available to be selected for this tenant.- Parameters:
allowedLocales- List ofLocalesavailable for this tenant.
-
setDefaultCurrency
TheCurrencythat 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 fordefaultLocalein response to API requests.- Parameters:
defaultCurrency- TheCurrencythat this tenant
-
setAllowedCurrencies
List ofCurrenciesthat are available to be selected for use with this tenant. AllCatalogsthat 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 ofCurrenciesthat 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
-