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
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
A subset ofTracking
information to expose the context state for this object.DefaultCurrency
associated 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.int
hashCode()
boolean
isHidden()
Whether this catalog is hidden from selection in the admin.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
setDefaultCurrency
(Currency defaultCurrency) DefaultCurrency
associated with this catalog, or null.void
setHidden
(boolean hidden) Whether this catalog is hidden from selection in the admin.void
The context id, which is a separate identifier from the database primary key.void
Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.void
The name for the catalogvoid
setOwningApplication
(String owningApplication) Soft reference to the application contextId that owns this catalog.void
setParents
(List<CatalogRef> parents) The parent nodes for this catalog, including additional mutability information.void
The type of this catalog such as standard or profile.void
setVendorRef
(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
Locale
for all of the items contained within
-
getDefaultCurrency
DefaultCurrency
associated 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 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
-
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
- theLocale
that all items within this catalog applies to
-
setDefaultCurrency
DefaultCurrency
associated 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 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
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-