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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
    A subset of Tracking information to expose the context state for this object.
    Default Currency associated with this catalog, or null.
    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.
    The name for the catalog
    Soft reference to the application contextId that owns this catalog.
    The parent nodes for this catalog, including additional mutability information.
    The type of this catalog such as standard or profile.
    Soft reference to the vendor associated with this catalog.
    int
     
    boolean
    Whether this catalog is hidden from selection in the admin.
    void
    setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
    A subset of Tracking information to expose the context state for this object.
    void
    setDefaultCurrency(Currency defaultCurrency)
    Default Currency 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
    setLocale(Locale locale)
    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 catalog
    void
    setOwningApplication(String owningApplication)
    Soft reference to the application contextId that owns this catalog.
    void
    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.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Catalog

      public Catalog()
  • Method Details

    • getId

      public String 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

      public String getName()
      The name for the catalog
      Returns:
      The name for the catalog
    • getOwningApplication

      public String 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 the owningApplication. Note that mutability of a catalog assigned to an application (see ApplicationCatalog.getCatalog()) is controlled via the properties on ApplicationCatalog.
      Returns:
      Whether this catalog is hidden from selection in the admin
    • getParents

      public List<CatalogRef> getParents()
      The parent nodes for this catalog, including additional mutability information.
      Returns:
      The parent nodes for this catalog
    • getLocale

      public Locale 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

      public Currency getDefaultCurrency()
      Default Currency associated with this catalog, or null.
      Returns:
      the default currency associated with this catalog or null
    • getVendorRef

      public String 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

      public String 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 of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      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

      public void setName(String name)
      The name for the catalog
      Parameters:
      name - The name for the catalog
    • setOwningApplication

      public void setOwningApplication(String owningApplication)
      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 the owningApplication. Note that mutability of a catalog assigned to an application (see ApplicationCatalog.getCatalog()) is controlled via the properties on ApplicationCatalog.
      Parameters:
      hidden - Whether this catalog is hidden from selection in the admin
    • setParents

      public void setParents(List<CatalogRef> parents)
      The parent nodes for this catalog, including additional mutability information.
      Parameters:
      parents - The parent nodes for this catalog
    • setLocale

      public void setLocale(Locale locale)
      Allows for segmenting catalogs via their locale, and encodes the assumption of the defaulted region for all items contained within it.
      Parameters:
      locale - the Locale that all items within this catalog applies to
    • setDefaultCurrency

      public void setDefaultCurrency(Currency defaultCurrency)
      Default Currency associated with this catalog, or null.
      Parameters:
      defaultCurrency - the default currency associated with this catalog
    • setVendorRef

      public void setVendorRef(String vendorRef)
      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

      public void setType(String type)
      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 of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object