Class ConsolidatedProduct

java.lang.Object
com.broadleafcommerce.catalog.domain.product.ConsolidatedProduct
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class ConsolidatedProduct extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware
Combined domain representing a product and its relations.
See Also:
  • Constructor Details

  • Method Details

    • getProduct

      public Product getProduct()
    • getVariants

      public List<Variant> getVariants()
    • getPrimaryCategory

      public CategoryRef getPrimaryCategory()
    • getExplicitCategories

      public List<CategoryRef> getExplicitCategories()
    • getCategories

      public List<CategoryRef> getCategories()
    • getDataDrivenEnums

      public List<DataDrivenEnum> getDataDrivenEnums()
    • getOptionAssets

      public Map<String,ProductAsset> getOptionAssets()
    • getAllAssets

      public List<ProductAsset> getAllAssets()
      All ProductAsset instances associated with this product.
    • getVendorRef

      public String getVendorRef()
      Soft reference to the vendor associated with the Product's catalog. This value can be null, in which case, no vendor is associated.
      Returns:
      soft reference to the vendor associated with the Product's catalog.
    • getProductSortingWithinCategories

      public Map<String,String> getProductSortingWithinCategories()
      This is a map of Category ID to sorting value from the CategoryProduct.
    • getCatalogOverrides

      public Set<String> getCatalogOverrides()
      The IDs of descendant catalogs in which this context version of the product has been overridden.

      e.g. if this product is in catalog A, and catalog B inherits this product from catalog A but contains a local change for this product, then the catalog A version product will contain "B" in its catalogOverrides.

      Returns:
      the IDs of any descendant catalogs in which this product has been overridden
    • getCatalogOmissions

      public Set<String> getCatalogOmissions()
      The IDs of descendant catalogs in which this context version of the product has been omitted as a result of one or more filters.

      e.g. if this product is in catalog A, and catalog B inherits this product from catalog A but contains a filter that removes it from the view of catalog B, then the catalog A version product will contain "B" in its catalogOmissions.

      Returns:
      the IDs of any descendant catalogs in which this product has been omitted.
    • getSandboxOverrides

      public Set<String> getSandboxOverrides()
      The IDs of descendant sandboxes in which this context version of the product has been overridden.

      e.g. if this product is in sandbox A, and sandbox B inherits this product from sandbox A but contains a local change for this product, then the sandbox A version product will contain "B" in its sandboxOverrides.

      Returns:
      the IDs of any descendant sandboxes in which this product has been overridden
    • getTranslations

      public List<com.broadleafcommerce.translation.domain.Translation> getTranslations()
      Translations for the product and all translatable consolidated objects.
    • getMarketplaceApplications

      public Set<String> getMarketplaceApplications()
      The IDs of marketplace applications where this product could appear in, based on the catalog hierarchy.
    • isArchived

      public boolean isArchived()
      Whether or not this product has been archived in this context state.
    • getSandboxOwner

      public String getSandboxOwner()
      The owner of the sandboxed product if it's in a user sandbox.

      This will only be populated if the Product ContextState level is TrackingLevel.USER.

    • isHasRequiredOptions

      public boolean isHasRequiredOptions()
      Does this product have required options? In other words, does it have any item choices with a minimum quantity greater than 0.
    • isRequiredOptionsAvailable

      public boolean isRequiredOptionsAvailable()
      If this product has required options, are there enough available item choices to purchase this product? Note: If hasRequiredOptions is false, this property should be ignored.
    • getAdvancedTags

      public List<AdvancedTagRef> getAdvancedTags()
      References to the AdvancedTags related to this product via any ProductTags.
      Returns:
      References to the AdvancedTags related to this product via any ProductTags.
    • setProduct

      public void setProduct(Product product)
    • setVariants

      public void setVariants(List<Variant> variants)
    • setPrimaryCategory

      public void setPrimaryCategory(CategoryRef primaryCategory)
    • setExplicitCategories

      public void setExplicitCategories(List<CategoryRef> explicitCategories)
    • setCategories

      public void setCategories(List<CategoryRef> categories)
    • setDataDrivenEnums

      public void setDataDrivenEnums(List<DataDrivenEnum> dataDrivenEnums)
    • setOptionAssets

      public void setOptionAssets(Map<String,ProductAsset> optionAssets)
    • setAllAssets

      public void setAllAssets(List<ProductAsset> allAssets)
      All ProductAsset instances associated with this product.
    • setVendorRef

      public void setVendorRef(String vendorRef)
      Soft reference to the vendor associated with the Product's catalog. This value can be null, in which case, no vendor is associated.
      Parameters:
      vendorRef - soft reference to the vendor associated with the Product's catalog.
    • setProductSortingWithinCategories

      public void setProductSortingWithinCategories(Map<String,String> productSortingWithinCategories)
      This is a map of Category ID to sorting value from the CategoryProduct.
    • setCatalogOverrides

      public void setCatalogOverrides(Set<String> catalogOverrides)
      The IDs of descendant catalogs in which this context version of the product has been overridden.

      e.g. if this product is in catalog A, and catalog B inherits this product from catalog A but contains a local change for this product, then the catalog A version product will contain "B" in its catalogOverrides.

      Parameters:
      catalogOverrides - the IDs of any descendant catalogs in which this product has been overridden
    • setCatalogOmissions

      public void setCatalogOmissions(Set<String> catalogOmissions)
      The IDs of descendant catalogs in which this context version of the product has been omitted as a result of one or more filters.

      e.g. if this product is in catalog A, and catalog B inherits this product from catalog A but contains a filter that removes it from the view of catalog B, then the catalog A version product will contain "B" in its catalogOmissions.

      Parameters:
      catalogOmissions - the IDs of any descendant catalogs in which this product has been omitted.
    • setSandboxOverrides

      public void setSandboxOverrides(Set<String> sandboxOverrides)
      The IDs of descendant sandboxes in which this context version of the product has been overridden.

      e.g. if this product is in sandbox A, and sandbox B inherits this product from sandbox A but contains a local change for this product, then the sandbox A version product will contain "B" in its sandboxOverrides.

      Parameters:
      catalogOverrides - the IDs of any descendant sandboxes in which this product has been overridden
    • setTranslations

      public void setTranslations(List<com.broadleafcommerce.translation.domain.Translation> translations)
      Translations for the product and all translatable consolidated objects.
    • setMarketplaceApplications

      public void setMarketplaceApplications(Set<String> marketplaceApplications)
      The IDs of marketplace applications where this product could appear in, based on the catalog hierarchy.
    • setArchived

      public void setArchived(boolean archived)
      Whether or not this product has been archived in this context state.
    • setSandboxOwner

      public void setSandboxOwner(String sandboxOwner)
      The owner of the sandboxed product if it's in a user sandbox.

      This will only be populated if the Product ContextState level is TrackingLevel.USER.

    • setHasRequiredOptions

      public void setHasRequiredOptions(boolean hasRequiredOptions)
      Does this product have required options? In other words, does it have any item choices with a minimum quantity greater than 0.
    • setRequiredOptionsAvailable

      public void setRequiredOptionsAvailable(boolean requiredOptionsAvailable)
      If this product has required options, are there enough available item choices to purchase this product? Note: If hasRequiredOptions is false, this property should be ignored.
    • setAdvancedTags

      public void setAdvancedTags(List<AdvancedTagRef> advancedTags)
      References to the AdvancedTags related to this product via any ProductTags.
      Parameters:
      advancedTags - References to the AdvancedTags related to this product via any ProductTags.
    • 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
    • getAttribute

      public <T> T getAttribute(String name)
    • isActive

      public boolean isActive()
    • isOnSale

      public boolean isOnSale()
    • getBusinessType

      public String getBusinessType()
    • getPriceWithDependentItems

      public javax.money.MonetaryAmount getPriceWithDependentItems()
    • getId

      public String getId()
    • getName

      public String getName()
    • getUri

      public String getUri()
    • getDescription

      public String getDescription()
    • getSku

      public String getSku()
    • getUpc

      public String getUpc()
    • getExternalId

      public String getExternalId()
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
    • getPricingKey

      public String getPricingKey()
    • getMsrp

      public javax.money.MonetaryAmount getMsrp()
    • getDefaultPrice

      public javax.money.MonetaryAmount getDefaultPrice()
    • getSalePrice

      public javax.money.MonetaryAmount getSalePrice()
    • getCost

      public javax.money.MonetaryAmount getCost()
    • getMetaTitle

      public String getMetaTitle()
    • getMetaDescription

      public String getMetaDescription()
    • getDisplayTemplate

      public String getDisplayTemplate()
    • isOnline

      public boolean isOnline()
    • isDiscountable

      public boolean isDiscountable()
    • getInventoryType

      public String getInventoryType()
    • getMergingType

      public String getMergingType()
    • isAvailableOnline

      public boolean isAvailableOnline()
    • getInventoryCheckStrategy

      public String getInventoryCheckStrategy()
    • getInventoryReservationStrategy

      public String getInventoryReservationStrategy()
    • isEligibleForPickup

      public boolean isEligibleForPickup()
    • getFulfillmentFlatRates

      public Map<String,FulfillmentFlatRate> getFulfillmentFlatRates()
    • getActiveStartDate

      public Instant getActiveStartDate()
    • getActiveEndDate

      public Instant getActiveEndDate()
    • getDimension

      public Dimensions getDimension()
    • getWeight

      public Weight getWeight()
    • isSearchable

      public boolean isSearchable()
    • isIndividuallySold

      public boolean isIndividuallySold()
    • isMerchandisingProduct

      @Deprecated public boolean isMerchandisingProduct()
      Deprecated.
    • getProductType

      public String getProductType()
    • getKeywords

      public List<String> getKeywords()
    • getAttributes

      public Map<String,Attribute> getAttributes()
    • getIncludedProducts

      public List<IncludedProduct> getIncludedProducts()
    • getOptions

      public List<ProductOption> getOptions()
    • getReviewsSummary

      public ReviewsSummary getReviewsSummary()
    • getPrimaryAsset

      public ProductAsset getPrimaryAsset()
    • getTags

      public List<String> getTags()
    • getBrand

      public DataDrivenEnum getBrand()
    • getMerchandisingType

      public DataDrivenEnum getMerchandisingType()
    • getTargetDemographic

      public DataDrivenEnum getTargetDemographic()
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • getTaxCode

      public String getTaxCode()
    • getMinimumThreshold

      public Integer getMinimumThreshold()
    • getMaximumThreshold

      public Integer getMaximumThreshold()
    • getDefaultVariant

      public Variant getDefaultVariant()
    • setId

      public void setId(String id)
    • setName

      public void setName(String name)
    • setUri

      public void setUri(String uri)
    • setDescription

      public void setDescription(String description)
    • setSku

      public void setSku(String sku)
    • setUpc

      public void setUpc(String upc)
    • setExternalId

      public void setExternalId(String externalId)
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
    • setPricingKey

      public void setPricingKey(String pricingKey)
    • setMsrp

      public void setMsrp(javax.money.MonetaryAmount msrp)
    • setDefaultPrice

      public void setDefaultPrice(javax.money.MonetaryAmount defaultPrice)
    • setSalePrice

      public void setSalePrice(javax.money.MonetaryAmount salePrice)
    • setCost

      public void setCost(javax.money.MonetaryAmount cost)
    • setMetaTitle

      public void setMetaTitle(String metaTitle)
    • setMetaDescription

      public void setMetaDescription(String metaDescription)
    • setDisplayTemplate

      public void setDisplayTemplate(String displayTemplate)
    • setOnline

      public void setOnline(boolean online)
    • setDiscountable

      public void setDiscountable(boolean discountable)
    • setInventoryType

      public void setInventoryType(String inventoryType)
    • setMergingType

      public void setMergingType(String mergingType)
    • setAvailableOnline

      public void setAvailableOnline(boolean availableOnline)
    • setInventoryCheckStrategy

      public void setInventoryCheckStrategy(String inventoryCheckStrategy)
    • setInventoryReservationStrategy

      public void setInventoryReservationStrategy(String inventoryReservationStrategy)
    • setEligibleForPickup

      public void setEligibleForPickup(boolean eligibleForPickup)
    • setFulfillmentFlatRates

      public void setFulfillmentFlatRates(Map<String,FulfillmentFlatRate> fulfillmentFlatRates)
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
    • setDimension

      public void setDimension(Dimensions dimension)
    • setWeight

      public void setWeight(Weight weight)
    • setSearchable

      public void setSearchable(boolean searchable)
    • setIndividuallySold

      public void setIndividuallySold(boolean individuallySold)
    • setMerchandisingProduct

      @Deprecated public void setMerchandisingProduct(boolean merchandisingProduct)
      Deprecated.
    • setProductType

      public void setProductType(String productType)
    • setBusinessType

      public void setBusinessType(String businessType)
    • setKeywords

      public void setKeywords(List<String> keywords)
    • setAttributes

      public void setAttributes(Map<String,Attribute> attributes)
    • setIncludedProducts

      public void setIncludedProducts(List<IncludedProduct> includedProducts)
    • setOptions

      public void setOptions(List<ProductOption> options)
    • setReviewsSummary

      public void setReviewsSummary(ReviewsSummary reviewsSummary)
    • setPrimaryAsset

      public void setPrimaryAsset(ProductAsset primaryAsset)
    • setTags

      public void setTags(List<String> tags)
    • setBrand

      public void setBrand(DataDrivenEnum brand)
    • setMerchandisingType

      public void setMerchandisingType(DataDrivenEnum merchandisingType)
    • setTargetDemographic

      public void setTargetDemographic(DataDrivenEnum targetDemographic)
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
    • setTaxCode

      public void setTaxCode(String taxCode)
    • setMinimumThreshold

      public void setMinimumThreshold(Integer minimumThreshold)
    • setMaximumThreshold

      public void setMaximumThreshold(Integer maximumThreshold)
    • setDefaultVariant

      public void setDefaultVariant(Variant defaultVariant)