java.lang.Object
com.broadleafcommerce.datafeed.service.collector.domain.product.CollectedProduct
All Implemented Interfaces:
CollectedEntity<String>, Priceable, Serializable

public class CollectedProduct extends Object implements CollectedEntity<String>, Serializable, Priceable
Entity that allows for flexible serialization, deserialization, and transformation of Product data.
See Also:
  • Constructor Details

    • CollectedProduct

      public CollectedProduct()
  • Method Details

    • getJsonMap

      public com.fasterxml.jackson.databind.node.ObjectNode getJsonMap()
      General ObjectNode representing the majority of this Product's JSON structure. This is intentionally not deserialized to a concrete DTO to allow for greater flexibility in implementation.
    • getTranslations

      public List<Translation> getTranslations()
      List of Translations associated with this Product.
    • getSkuInventory

      public Map<String,Long> getSkuInventory()
      Map of SKU to available inventory.
      See Also:
    • getSkuPrices

      public Map<String,com.broadleafcommerce.pricing.client.domain.PriceInfo> getSkuPrices()
      If this Product has SKUs, and if those SKUs have assigned a PriceInfo, then this Map will contain an entry where the key is the SKU and the value is the PriceInfo for the Variant with that SKU. If this product has no Variants, or if there is no PriceInfo assigned to a Variant then there will be no entry in this Map for that SKU and the Product's PriceInfo should be used.
    • getProductRating

      public RatingSummary getProductRating()
      The overall rating for this product.
      See Also:
    • getPriceInfo

      public com.broadleafcommerce.pricing.client.domain.PriceInfo getPriceInfo()
      The PriceInfo associated with this product, or null.
      Specified by:
      getPriceInfo in interface Priceable
      Returns:
      The PriceInfo on the entity.
    • setId

      public void setId(String id)
      Product ID
    • setJsonMap

      public void setJsonMap(com.fasterxml.jackson.databind.node.ObjectNode jsonMap)
      General ObjectNode representing the majority of this Product's JSON structure. This is intentionally not deserialized to a concrete DTO to allow for greater flexibility in implementation.
    • setTranslations

      public void setTranslations(List<Translation> translations)
      List of Translations associated with this Product.
    • setSkuInventory

      public void setSkuInventory(Map<String,Long> skuInventory)
      Map of SKU to available inventory.
      See Also:
    • setSkuPrices

      public void setSkuPrices(Map<String,com.broadleafcommerce.pricing.client.domain.PriceInfo> skuPrices)
      If this Product has SKUs, and if those SKUs have assigned a PriceInfo, then this Map will contain an entry where the key is the SKU and the value is the PriceInfo for the Variant with that SKU. If this product has no Variants, or if there is no PriceInfo assigned to a Variant then there will be no entry in this Map for that SKU and the Product's PriceInfo should be used.
    • setProductRating

      public void setProductRating(RatingSummary productRating)
      The overall rating for this product.
      See Also:
    • setPriceInfo

      public void setPriceInfo(com.broadleafcommerce.pricing.client.domain.PriceInfo priceInfo)
      The PriceInfo associated with this product, or null.
      Specified by:
      setPriceInfo in interface Priceable
      Parameters:
      priceInfo - The PriceInfo to set.
    • 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
    • getId

      public String getId()
      Product ID
      Specified by:
      getId in interface CollectedEntity<String>
      Returns:
      The ID of the collected entity