Class Application
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
,Serializable
- Author:
- Jeff Fischer
- See Also:
-
Application
- Serialized Form
-
Constructor Summary
ConstructorDescriptionApplication
(String id, String name, String token, String identifierType, String identifierValue, String customerContextId, boolean deactivated, Locale defaultLocale, List<Locale> allowedLocales, Currency defaultCurrency, List<Currency> allowedCurrencies, ApplicationAsset portraitAsset, ApplicationAsset logoAsset, Map<String, Object> attributes, List<ApplicationCatalogRef> isolatedCatalogs, boolean isMarketplace, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState, String robots) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
List ofCurrencies
that are available to be selected for use with this application.List ofLocales
that are available to be selected for this application.Arbitrary attributes associated with this application.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.The customer context id that is used to discriminate entities withTrackableBehavior.CUSTOMER_CONTEXT
.TheCurrency
that this application, by default, assumes all data is within and can drive the default currency selection on a frontend.getId()
The context id, which is a separate identifier from the database primary key.Defines the type of the application resolution identifier: Whether a domain or a domain prefix.Determines how applications are resolved using all or part of their domains or hostnames.Individual catalogs assigned to this application.The asset information for the application's logo.getName()
The general name for the applicationThe asset information for the application's portrait.A robots.txt file contents tells search engine crawlers which pages or files the crawler can or can't request from your site.getToken()
The token used for API access to this application's data.int
hashCode()
boolean
Determines whether this application is active.boolean
Whether or not the application is a marketplace application.void
setAllowedCurrencies
(List<Currency> allowedCurrencies) List ofCurrencies
that are available to be selected for use with this application.void
setAllowedLocales
(List<Locale> allowedLocales) List ofLocales
that are available to be selected for this application.void
setAttributes
(Map<String, Object> attributes) Arbitrary attributes associated with this application.void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.void
setCustomerContextId
(String customerContextId) The customer context id that is used to discriminate entities withTrackableBehavior.CUSTOMER_CONTEXT
.void
setDeactivated
(boolean deactivated) Determines whether this application is active.void
setDefaultCurrency
(Currency defaultCurrency) TheCurrency
that this application, by default, assumes all data is within and can drive the default currency selection on a frontend.void
setDefaultLocale
(Locale defaultLocale) void
The context id, which is a separate identifier from the database primary key.void
setIdentifierType
(String identifierType) Defines the type of the application resolution identifier: Whether a domain or a domain prefix.void
setIdentifierValue
(String identifierValue) Determines how applications are resolved using all or part of their domains or hostnames.void
setIsolatedCatalogs
(List<ApplicationCatalogRef> isolatedCatalogs) Individual catalogs assigned to this application.void
setLogoAsset
(ApplicationAsset logoAsset) The asset information for the application's logo.void
setMarketplace
(boolean isMarketplace) Whether or not the application is a marketplace application.void
The general name for the applicationvoid
setPortraitAsset
(ApplicationAsset portraitAsset) The asset information for the application's portrait.void
A robots.txt file contents tells search engine crawlers which pages or files the crawler can or can't request from your site.void
The token used for API access to this application's data.toString()
-
Constructor Details
-
Application
public Application() -
Application
public Application(String id, String name, String token, String identifierType, String identifierValue, String customerContextId, boolean deactivated, Locale defaultLocale, List<Locale> allowedLocales, Currency defaultCurrency, List<Currency> allowedCurrencies, ApplicationAsset portraitAsset, ApplicationAsset logoAsset, Map<String, Object> attributes, List<ApplicationCatalogRef> isolatedCatalogs, boolean isMarketplace, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState, String robots)
-
-
Method Details
-
getId
The context id, which is a separate identifier from the database primary key. This may be auto generated, or may be explicitly provided upon entity creation.- Returns:
- Separate identifier from the database primary key
-
getName
The general name for the application- Returns:
- The general name for the application
-
getToken
The token used for API access to this application's data.- Returns:
- the token used for API access to this application's data
-
getIdentifierType
Defines the type of the application resolution identifier: Whether a domain or a domain prefix.- Returns:
- the type of the application resolution identifier: Whether a domain or a domain prefix.
- See Also:
-
ResolutionIdentifierType
-
getIdentifierValue
Determines how applications are resolved using all or part of their domains or hostnames. Values could be themyapplication.mycompany.com
inhttps://myapplication.mycompany.com/
or themyapplication
inhttps://myapplication.mycompany.com/
depending onidentifierType
.- Returns:
- the domain (a.k.a., hostname) or domain segment identifying this application.
- See Also:
-
identifierType
-
getCustomerContextId
The customer context id that is used to discriminate entities with
TrackableBehavior.CUSTOMER_CONTEXT
.If it is null on a newly created application, then the property
TenantApplicationProperties.Customer.getContextMethod()
is used to default it. IfCustomerContextResolverMethod.APPLICATION
uses the ID of theApplication
. IfCustomerContextResolverMethod.TENANT
, uses the ID of theTenant
.- Returns:
- the customer context id
- See Also:
-
isDeactivated
public boolean isDeactivated()Determines whether this application is active.- Returns:
- Determines whether this application is active.
-
getDefaultLocale
TheLocale
that this application, by default, assumes all data is within and can drive the defaultLocale
selection as a result.- Returns:
- The default
Locale
-
getAllowedLocales
List ofLocales
that are available to be selected for this application. AllCatalogs
that are related to this application should be restricted to this locale set.- Returns:
- List of
Locales
available for this application.
-
getDefaultCurrency
TheCurrency
that this application, 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 application.
-
getAllowedCurrencies
List ofCurrencies
that are available to be selected for use with this application. AllCatalogs
that are related to this application 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 application
-
getPortraitAsset
The asset information for the application's portrait. If populated, this property will be used within the admin to display a portrait for this application within the application selector. If not populated, a generic fallback icon will be displayed instead.- Returns:
- the portrait asset, or null
-
getLogoAsset
The asset information for the application's logo. If populated, this property will be used within the admin to display the logo for the application-level admin. If not populated, the admin will utilize theTenant.getLogoAsset()
if it exists.- Returns:
- the logo asset, or null
-
getAttributes
Arbitrary attributes associated with this application. May include soft references to related entities, custom fields, or other data.- Returns:
- Map of attributes for this application
-
getIsolatedCatalogs
Individual catalogs assigned to this application.ApplicationCatalogRefs
provide additional control over the mutability and visibility of the entities of the catalogs assigned.- Returns:
- Individual catalogs assigned to this application
- See Also:
-
isMarketplace
public boolean isMarketplace()Whether or not the application is a marketplace application. Marketplace applications leverageMarketplaceApplicationCatalog
relationships to catalogs, in addition to the explicit relationships declared ingetIsolatedCatalogs()
.Generally, all relationships to vendor catalogs should be defined exclusively with
MarketplaceApplicationCatalog
, and any additional relationships to non-vendor catalogs would be ingetIsolatedCatalogs()
. -
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTracking
information to expose the context state for this object.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
getRobots
A robots.txt file contents tells search engine crawlers which pages or files the crawler can or can't request from your site. This is used mainly to avoid overloading your site with requests;- Returns:
- a string of the contents of the robots.txt
-
setId
The context id, which is a separate identifier from the database primary key. This may be auto generated, or may be explicitly provided upon entity creation.- Parameters:
id
- Separate identifier from the database primary key
-
setName
The general name for the application- Parameters:
name
- The general name for the application
-
setToken
The token used for API access to this application's data.- Parameters:
token
- the token used for API access to this application's data
-
setIdentifierType
Defines the type of the application resolution identifier: Whether a domain or a domain prefix.- Parameters:
identifierType
- the type of the application resolution identifier: Whether a domain or a domain prefix.- See Also:
-
ResolutionIdentifierType
-
setIdentifierValue
Determines how applications are resolved using all or part of their domains or hostnames. Values could be themyapplication.mycompany.com
inhttps://myapplication.mycompany.com/
or themyapplication
inhttps://myapplication.mycompany.com/
depending onidentifierType
.- Parameters:
identifierValue
- the domain (a.k.a., hostname) or domain segment identifying this application.- See Also:
-
identifierType
-
setCustomerContextId
The customer context id that is used to discriminate entities with
TrackableBehavior.CUSTOMER_CONTEXT
.If it is null on a newly created application, then the property
TenantApplicationProperties.Customer.getContextMethod()
is used to default it. IfCustomerContextResolverMethod.APPLICATION
uses the ID of theApplication
. IfCustomerContextResolverMethod.TENANT
, uses the ID of theTenant
.- Parameters:
customerContextId
- the customer context id- See Also:
-
setDeactivated
public void setDeactivated(boolean deactivated) Determines whether this application is active.- Parameters:
deactivated
- Determines whether this application is active.
-
setDefaultLocale
TheLocale
that this application, by default, assumes all data is within and can drive the defaultLocale
selection as a result.- Parameters:
defaultLocale
- The defaultLocale
-
setAllowedLocales
List ofLocales
that are available to be selected for this application. AllCatalogs
that are related to this application should be restricted to this locale set.- Parameters:
allowedLocales
- List ofLocales
available for this application.
-
setDefaultCurrency
TheCurrency
that this application, 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 application
-
setAllowedCurrencies
List ofCurrencies
that are available to be selected for use with this application. AllCatalogs
that are related to this application 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 application
-
setPortraitAsset
The asset information for the application's portrait. If populated, this property will be used within the admin to display a portrait for this application within the application selector. If not populated, a generic fallback icon will be displayed instead.- Parameters:
portraitAsset
- the next portrait asset
-
setLogoAsset
The asset information for the application's logo. If populated, this property will be used within the admin to display the logo for the application-level admin. If not populated, the admin will utilize theTenant.getLogoAsset()
if it exists.- Parameters:
logoAsset
- the next logo asset
-
setAttributes
Arbitrary attributes associated with this application. May include soft references to related entities, custom fields, or other data.- Parameters:
attributes
- Map of attributes for this application
-
setIsolatedCatalogs
Individual catalogs assigned to this application.ApplicationCatalogRefs
provide additional control over the mutability and visibility of the entities of the catalogs assigned.- Parameters:
isolatedCatalogs
- Individual catalogs assigned to this application- See Also:
-
setMarketplace
public void setMarketplace(boolean isMarketplace) Whether or not the application is a marketplace application. Marketplace applications leverageMarketplaceApplicationCatalog
relationships to catalogs, in addition to the explicit relationships declared ingetIsolatedCatalogs()
.Generally, all relationships to vendor catalogs should be defined exclusively with
MarketplaceApplicationCatalog
, and any additional relationships to non-vendor catalogs would be ingetIsolatedCatalogs()
. -
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTracking
information to expose the context state for this object.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
setRobots
A robots.txt file contents tells search engine crawlers which pages or files the crawler can or can't request from your site. This is used mainly to avoid overloading your site with requests; -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-