public class Application extends Object implements ContextStateAware, Serializable
Constructor and Description |
---|
Application() |
Application(String id) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
List<Currency> |
computeAllowedCurrencies()
Utility method to retrieve allowed currencies.
|
Currency |
computeDefaultCurrency()
Utility method to retrieve the default currency.
|
boolean |
equals(Object o) |
List<Currency> |
getAllowedCurrencies()
List of
Currencies that are available to be selected for use with this
application. |
List<Locale> |
getAllowedLocales()
List of
Locale s that are available to be selected for this application. |
ContextState |
getContextState()
A subset of
Tracking information to expose the context state for this object. |
String |
getCustomerContextId()
The customer context id that is used to discriminate entities with
TrackableBehavior.CUSTOMER_CONTEXT . |
Currency |
getDefaultCurrency()
The
Currency that this application, by default, assumes all data is within and can
drive the default currency selection on a frontend. |
Locale |
getDefaultLocale()
|
String |
getId()
The context id, which is a separate identifier from the database primary key.
|
String |
getIdentifierType()
Defines the type of the application identifier: Whether a domain or a domain prefix.
|
String |
getIdentifierValue()
Determines how applications are distinguished from each other using all or part of their
domains or hostnames.
|
InheritanceLines |
getInheritanceLines()
Context list of the contextIds for the deep catalog tree parenting the
isolatedCatalogs . |
List<ApplicationCatalogRef> |
getIsolatedCatalogs()
Individual catalogs assigned to this application.
|
String |
getName()
The general name for the application
|
String |
getTenantId()
The tenant to which this application belongs
|
int |
hashCode() |
boolean |
isDeactivated()
Determines whether this application is active.
|
boolean |
isMarketplace()
Whether or not the application is a marketplace application.
|
String |
mutability(Catalog catalog)
Given a catalog, determine the mutability of that catalog from the viewpoint of this
application.
|
void |
setAllowedCurrencies(List<Currency> allowedCurrencies)
List of
Currencies that are available to be selected for use with this
application. |
void |
setAllowedLocales(List<Locale> allowedLocales)
List of
Locale s that are available to be selected for this application. |
void |
setContextState(ContextState contextState)
A subset of
Tracking information to expose the context state for this object. |
void |
setCustomerContextId(String customerContextId)
The customer context id that is used to discriminate entities with
TrackableBehavior.CUSTOMER_CONTEXT . |
void |
setDeactivated(boolean deactivated)
Determines whether this application is active.
|
void |
setDefaultCurrency(Currency defaultCurrency)
The
Currency 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 |
setId(String id)
The context id, which is a separate identifier from the database primary key.
|
void |
setIdentifierType(String identifierType)
Defines the type of the application identifier: Whether a domain or a domain prefix.
|
void |
setIdentifierValue(String identifierValue)
Determines how applications are distinguished from each other using all or part of their
domains or hostnames.
|
void |
setInheritanceLines(InheritanceLines inheritanceLines)
Context list of the contextIds for the deep catalog tree parenting the
isolatedCatalogs . |
void |
setIsolatedCatalogs(List<ApplicationCatalogRef> isolatedCatalogs)
Individual catalogs assigned to this application.
|
void |
setMarketplace(boolean isMarketplace)
Whether or not the application is a marketplace application.
|
void |
setName(String name)
The general name for the application
|
void |
setTenantId(String tenantId)
The tenant to which this application belongs
|
String |
toString() |
public Application(String id)
public Application()
@Nullable public String mutability(@NonNull Catalog catalog)
catalog
- the catalog instance to checkMutabilityType.CUSTOMIZABLE
public Currency computeDefaultCurrency()
defaultCurrency
is null, this
will compute it from the default currency (Currency.getInstance(Locale)
) of
defaultLocale
.defaultCurrency
public List<Currency> computeAllowedCurrencies()
allowedCurrencies
is empty, this
will compute them from the default currencies (Currency.getInstance(Locale)
) for each
of the allowed locales
. Otherwise, this will return a copy of
allowedCurrencies
to prevent accidental mutation.allowedCurrencies
public String getId()
public String getName()
public String getTenantId()
public String getIdentifierType()
ResolutionIdentifierType
public String getIdentifierValue()
myapplication.mycompany.com
in https://myapplication.mycompany.com/
or the myapplication
in
https://myapplication.mycompany.com/
depending on identifierType
.identifierType
public String getCustomerContextId()
TrackableBehavior.CUSTOMER_CONTEXT
.public boolean isDeactivated()
public Locale getDefaultLocale()
Locale
that this application, by default, assumes all data is within and can
drive the default Locale
selection as a result.Locale
as a string.public List<Locale> getAllowedLocales()
Locale
s that are available to be selected for this application. All
Catalog
s within that are related to this application's should be restricted to this
locale set.Locale
s available for this application.public Currency getDefaultCurrency()
Currency
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 for defaultLocale
in response to API requests.Currency
that this application.public List<Currency> getAllowedCurrencies()
Currencies
that are available to be selected for use with this
application. All Catalogs
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 in allowedLocales
.Currencies
that are available to be selected for use with
this applicationpublic List<ApplicationCatalogRef> getIsolatedCatalogs()
ApplicationCatalogRefs
provide additional control over the mutability and visibility of the
contents of the catalogs assigned.ApplicationCatalogRef
public InheritanceLines getInheritanceLines()
isolatedCatalogs
. These values are generally not included in reported Json, but
instead are calculated and leveraged internally during catalog visibility and mutability
determinations.isolatedCatalogs
public boolean isMarketplace()
MarketplaceApplicationCatalog
relationships to catalogs, in addition to the
explicit relationships declared in getIsolatedCatalogs()
.
Generally, all relationships to vendor catalogs should be defined exclusively with
MarketplaceApplicationCatalog
, and any additional relationships to non-vendor
catalogs would be in getIsolatedCatalogs()
.
public ContextState getContextState()
Tracking
information to expose the context state for this object.getContextState
in interface ContextStateAware
Tracking
information to expose the context state for this objectpublic void setId(String id)
id
- Separate identifier from the database primary keypublic void setName(String name)
name
- The general name for the applicationpublic void setTenantId(String tenantId)
tenantId
- The tenant to which this application belongspublic void setIdentifierType(String identifierType)
identifierType
- the type of the application identifier: Whether a domain or a domain
prefix.ResolutionIdentifierType
public void setIdentifierValue(String identifierValue)
myapplication.mycompany.com
in https://myapplication.mycompany.com/
or the myapplication
in
https://myapplication.mycompany.com/
depending on identifierType
.identifierValue
- the domain (a.k.a., hostname) or domain segment identifying this
application.identifierType
public void setCustomerContextId(String customerContextId)
TrackableBehavior.CUSTOMER_CONTEXT
.public void setDeactivated(boolean deactivated)
deactivated
- Determines whether this application is active.public void setDefaultLocale(Locale defaultLocale)
Locale
that this application, by default, assumes all data is within and can
drive the default Locale
selection as a result.defaultLocale
- The default Locale
as a string.public void setAllowedLocales(List<Locale> allowedLocales)
Locale
s that are available to be selected for this application. All
Catalog
s within that are related to this application's should be restricted to this
locale set.allowedLocales
- List of Locale
s available for this application.public void setDefaultCurrency(Currency defaultCurrency)
Currency
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 for defaultLocale
in response to API requests.defaultCurrency
- The Currency
that this applicationpublic void setAllowedCurrencies(List<Currency> allowedCurrencies)
Currencies
that are available to be selected for use with this
application. All Catalogs
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 in allowedLocales
.allowedCurrencies
- List of Currencies
that are available to be
selected for use with this applicationpublic void setIsolatedCatalogs(List<ApplicationCatalogRef> isolatedCatalogs)
ApplicationCatalogRefs
provide additional control over the mutability and visibility of the
contents of the catalogs assigned.isolatedCatalogs
- Individual catalogs assigned to this applicationApplicationCatalogRef
public void setInheritanceLines(InheritanceLines inheritanceLines)
isolatedCatalogs
. These values are generally not included in reported Json, but
instead are calculated and leveraged internally during catalog visibility and mutability
determinations.Context
- list of the contextIds for the deep catalog tree parenting the
isolatedCatalogs
public void setMarketplace(boolean isMarketplace)
MarketplaceApplicationCatalog
relationships to catalogs, in addition to the
explicit relationships declared in getIsolatedCatalogs()
.
Generally, all relationships to vendor catalogs should be defined exclusively with
MarketplaceApplicationCatalog
, and any additional relationships to non-vendor
catalogs would be in getIsolatedCatalogs()
.
isMarketplace
- Whether or not the application is a marketplacepublic void setContextState(ContextState contextState)
Tracking
information to expose the context state for this object.setContextState
in interface ContextStateAware
contextState
- a subset of Tracking
information to expose the context state for
this objectprotected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.