Class Catalog
java.lang.Object
com.broadleafcommerce.tenant.domain.Catalog
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware
public class Catalog
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware
Represents a catalog node in an overall catalog tree. A "catalog" provides a means to group
content that allows inheritance between groups. The most common use is grouping product
information such as products, variants, and categories. Another would be grouping digital content
like pages, components, and widgets.
A catalog can be assigned to specific
Applications and can inherit content
from other catalogs, forming an inheritance line. The inherited content can be read only or
customizable.- Author:
- Jeff Fischer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleancom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.DefaultCurrencyassociated with this catalog, or null.getId()The context id, which is a separate identifier from the database primary key.Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.getName()The name for the catalogSoft reference to the application contextId that owns this catalog.The parent nodes for this catalog, including additional mutability information.getType()The type of this catalog such as standard or profile.Soft reference to the vendor associated with this catalog.inthashCode()booleanisHidden()Whether this catalog is hidden from selection in the admin.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetDefaultCurrency(Currency defaultCurrency) DefaultCurrencyassociated with this catalog, or null.voidsetHidden(boolean hidden) Whether this catalog is hidden from selection in the admin.voidThe context id, which is a separate identifier from the database primary key.voidAllows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.voidThe name for the catalogvoidsetOwningApplication(String owningApplication) Soft reference to the application contextId that owns this catalog.voidsetParents(List<CatalogRef> parents) The parent nodes for this catalog, including additional mutability information.voidThe type of this catalog such as standard or profile.voidsetVendorRef(String vendorRef) Soft reference to the vendor associated with this catalog.toString()
-
Constructor Details
-
Catalog
public Catalog()
-
-
Method Details
-
getId
The context id, which is a separate identifier from the database primary key. This may be auto generated, or may be explicity provided upon entity creation.- Returns:
- Separate identifier from the database primary key
-
getName
The name for the catalog- Returns:
- The name for the catalog
-
getOwningApplication
Soft reference to the application contextId that owns this catalog. This value can be null, in which case, this is a global catalog.- Returns:
- Soft reference to the application contextId that owns this catalog
-
isHidden
public boolean isHidden()Whether this catalog is hidden from selection in the admin. This also indicates the catalog is not available for mutation via theowningApplication. Note that mutability of a catalog assigned to an application (seeApplicationCatalog.getCatalog()) is controlled via the properties onApplicationCatalog.- Returns:
- Whether this catalog is hidden from selection in the admin
-
getParents
The parent nodes for this catalog, including additional mutability information.- Returns:
- The parent nodes for this catalog
-
getLocale
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.- Returns:
- the
Localefor all of the items contained within
-
getDefaultCurrency
DefaultCurrencyassociated with this catalog, or null.- Returns:
- the default currency associated with this catalog or null
-
getVendorRef
Soft reference to the vendor associated with this catalog. This value can be null, in which case, no vendor is associated.This value is immutable after the catalog is created.
- Returns:
- Soft reference to the vendor associated with this catalog.
-
getType
The type of this catalog such as standard or profile. Catalogs are fundamentally just a way to group other entities within a hierarchical structure. Standard catalogs include product information while 'profiles' include digital content (pages, widgets, etc.).This value is immutable after the catalog is created.
- Returns:
- The type of this catalog
- See Also:
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setId
The context id, which is a separate identifier from the database primary key. This may be auto generated, or may be explicity provided upon entity creation.- Parameters:
id- Separate identifier from the database primary key
-
setName
The name for the catalog- Parameters:
name- The name for the catalog
-
setOwningApplication
Soft reference to the application contextId that owns this catalog. This value can be null, in which case, this is a global catalog.- Parameters:
owningApplication- Soft reference to the application contextId that owns this catalog
-
setHidden
public void setHidden(boolean hidden) Whether this catalog is hidden from selection in the admin. This also indicates the catalog is not available for mutation via theowningApplication. Note that mutability of a catalog assigned to an application (seeApplicationCatalog.getCatalog()) is controlled via the properties onApplicationCatalog.- Parameters:
hidden- Whether this catalog is hidden from selection in the admin
-
setParents
The parent nodes for this catalog, including additional mutability information.- Parameters:
parents- The parent nodes for this catalog
-
setLocale
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.- Parameters:
locale- theLocalethat all items within this catalog applies to
-
setDefaultCurrency
DefaultCurrencyassociated with this catalog, or null.- Parameters:
defaultCurrency- the default currency associated with this catalog
-
setVendorRef
Soft reference to the vendor associated with this catalog. This value can be null, in which case, no vendor is associated.This value is immutable after the catalog is created.
- Parameters:
vendorRef- Soft reference to the vendor associated with this catalog.
-
setType
The type of this catalog such as standard or profile. Catalogs are fundamentally just a way to group other entities within a hierarchical structure. Standard catalogs include product information while 'profiles' include digital content (pages, widgets, etc.).This value is immutable after the catalog is created.
- Parameters:
type- The type of this catalog- See Also:
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-