java.lang.Object
com.broadleafcommerce.catalog.domain.product.commerce.ProductDetails
All Implemented Interfaces:
Serializable

public class ProductDetails extends Object implements Serializable
A structure containing all the info necessary for a product details page shown in a commerce-facing app (as opposed to a PIM UI).
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

  • Method Details

    • getMetaDescription

      public String getMetaDescription()
      Used for SEO data in <meta description=""> in a product detail page. If this is unset, getDescription() is delegated to.
      Returns:
      the meta description used for SEO data in product details page description
    • getMetaTitle

      public String getMetaTitle()
      Used for SEO data in <title> tag in a product detail page. If this is unset, getName() is delegated to.
      Returns:
      the meta title used for SEO data in product details page title
    • getProduct

      public Product getProduct()
    • getAssets

      public List<ProductAsset> getAssets()
      All ProductAssets for this product.
      Returns:
      All ProductAssets for this product.
    • getBreadcrumbs

      public List<Breadcrumb> getBreadcrumbs()
      Navigational Breadcrumbs to show on the details view.
      Returns:
      Navigational Breadcrumbs to show on the details view.
    • getIncludedProducts

      public List<IncludedProductDetail> getIncludedProducts()
      Additional products that are always included with the product, no matter what. Used to create fixed "bundles" or "kits".

      If some of these items should be optional or the user should decide which additional items are added to their cart, use options instead.

      Returns:
      additional products that bundle with this product as their parent
    • getOptions

      public List<ProductOptionDetail> getOptions()
      Drives additional information that the customer should enter when purchasing this product. this can be in the form of additional variations, additional items that can be bundled with this product or simply more information that the customer needs to enter about what they are purchasing (like a personalized message).
      Returns:
      different options that the user can configure to further refine their purchase.
    • getPriceInfo

      public PriceInfo getPriceInfo()
      Summary of the pricing information related to the product.
      Returns:
      Summary of the pricing information related to the product
    • getVariants

      public List<VariantDetail> getVariants()
      All Variants for this product.
      Returns:
      All Variants for this product.
    • getLiteVariants

      public List<LiteVariant> getLiteVariants()
      All variants represented as LiteVariants for this product. These should only be hydrated when DefaultProductVariantHydrationBehavior.LITE_ONLY is used.
      Returns:
      All LiteVariants for this product.
      Since:
      Catalog Service 2.3.0, Release Train 2.3.0
    • getParentCategories

      public Set<CategoryRef> getParentCategories()
      All Categories that include the product.
      Returns:
      All Categories that include the product.
    • getCategoryIdsWithParents

      public List<String> getCategoryIdsWithParents()
      List of all hierarchical parent category ids for the product.

      This is different from parentCategories as parentCategories represents the categories that are directly assigned to the product, whereas categoryIdsWithParents contains a hierarchical list of all parent category ids.

      For example, if we have a category setup of: Top -> Level2 -> Level3 and the product is assigned to Level3, the list would be {Top, Level2, Level3}.

      Returns:
      List of all hierarchical parent category ids for the product.
    • getPromotionalProducts

      public Map<String,List<PromotionalProductSummary>> getPromotionalProducts()
      Map of all of the related PromotionalProducts grouped by type.
      Returns:
      Related PromotionalProducts grouped by type.
    • 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.
      Returns:
      Soft reference to the vendor associated with this catalog.
    • getAdvancedTags

      public List<ProductTagDetail> getAdvancedTags()
      A list of ProductTags sorted based on the sort position of the ProductTag for the product with ties broken by AdvancedTag.getPriority().
      Returns:
      A list of ProductTags.
    • getParentCharacteristics

      public Map<String,Characteristic> getParentCharacteristics()
      Map of the Characteristics referenced by the ProductCharacteristics where the key is the characteristic's fieldName. This is used instead of hydrating directly onto each ProductCharacteristic to reduce duplication and payload size.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • setProduct

      public void setProduct(Product product)
    • setAssets

      public void setAssets(List<ProductAsset> assets)
      All ProductAssets for this product.
      Parameters:
      assets - All ProductAssets for this product.
    • setBreadcrumbs

      public void setBreadcrumbs(List<Breadcrumb> breadcrumbs)
      Navigational Breadcrumbs to show on the details view.
      Parameters:
      breadcrumbs - Navigational Breadcrumbs to show on the details view.
    • setIncludedProducts

      public void setIncludedProducts(List<IncludedProductDetail> includedProducts)
      Additional products that are always included with the product, no matter what. Used to create fixed "bundles" or "kits".

      If some of these items should be optional or the user should decide which additional items are added to their cart, use options instead.

      Parameters:
      includedProducts - that bundle with this product as their parent
    • setOptions

      public void setOptions(List<ProductOptionDetail> options)
      Drives additional information that the customer should enter when purchasing this product. this can be in the form of additional variations, additional items that can be bundled with this product or simply more information that the customer needs to enter about what they are purchasing (like a personalized message).
      Parameters:
      options - the options for this product
    • setPriceInfo

      public void setPriceInfo(PriceInfo priceInfo)
      Summary of the pricing information related to the product.
      Parameters:
      priceInfo - Summary of the pricing information related to the product
    • setVariants

      public void setVariants(List<VariantDetail> variants)
      All Variants for this product.
      Parameters:
      variants - All Variants for this product.
    • setLiteVariants

      public void setLiteVariants(List<LiteVariant> liteVariants)
      All variants represented as LiteVariants for this product. These should only be hydrated when DefaultProductVariantHydrationBehavior.LITE_ONLY is used.
      Parameters:
      liteVariants - All LiteVariants for this product.
      Since:
      Catalog Service 2.3.0, Release Train 2.3.0
    • setParentCategories

      public void setParentCategories(Set<CategoryRef> parentCategories)
      All Categories that include the product.
      Parameters:
      parentCategories - All Categories that include the product.
    • setCategoryIdsWithParents

      public void setCategoryIdsWithParents(List<String> categoryIdsWithParents)
      List of all hierarchical parent category ids for the product.

      This is different from parentCategories as parentCategories represents the categories that are directly assigned to the product, whereas categoryIdsWithParents contains a hierarchical list of all parent category ids.

      For example, if we have a category setup of: Top -> Level2 -> Level3 and the product is assigned to Level3, the list would be {Top, Level2, Level3}.

      Parameters:
      categoryIdsWithParents - List of all hierarchical parent category ids for the product.
    • setPromotionalProducts

      public void setPromotionalProducts(Map<String,List<PromotionalProductSummary>> promotionalProducts)
      Map of all of the related PromotionalProducts grouped by type.
      Parameters:
      promotionalProducts - Related PromotionalProducts grouped by type.
    • 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.
      Parameters:
      vendorRef - Soft reference to the vendor associated with this catalog.
    • setAdvancedTags

      public void setAdvancedTags(List<ProductTagDetail> advancedTags)
      A list of ProductTags sorted based on the sort position of the ProductTag for the product with ties broken by AdvancedTag.getPriority().
      Parameters:
      advancedTags - A list of ProductTags.
    • setParentCharacteristics

      public void setParentCharacteristics(Map<String,Characteristic> parentCharacteristics)
      Map of the Characteristics referenced by the ProductCharacteristics where the key is the characteristic's fieldName. This is used instead of hydrating directly onto each ProductCharacteristic to reduce duplication and payload size.
      Since:
      Catalog Service 2.2.0, Release Train 2.2.0
    • 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()
    • setCharacteristicsFromList

      public void setCharacteristicsFromList(List<ProductCharacteristic> characteristics)
    • getCharacteristicsValues

      public List<ProductCharacteristic> getCharacteristicsValues()
    • getPriceWithDependentItems

      public javax.money.MonetaryAmount getPriceWithDependentItems()
    • getDefaultTerm

      public ProductTerm getDefaultTerm()
    • 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()
    • getDisplayTemplate

      public String getDisplayTemplate()
    • isOnline

      public boolean isOnline()
    • isDiscountable

      public boolean isDiscountable()
    • getAutoRenewalEnabled

      public Boolean getAutoRenewalEnabled()
    • getAllowAutoRenewalModification

      public Boolean getAllowAutoRenewalModification()
    • 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()
    • getVariantsToGenerate

      public List<Set<ProductOptionValueCombination>> getVariantsToGenerate()
    • getDefaultFrequency

      public ProductRecurringFrequency getDefaultFrequency()
    • getTerms

      public List<ProductTerm> getTerms()
    • getPaymentStrategy

      public String getPaymentStrategy()
    • getAttributes

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

      public Map<String,ProductCharacteristic> getCharacteristics()
    • getReviewsSummary

      public ReviewsSummary getReviewsSummary()
    • getPrimaryAsset

      public ProductAsset getPrimaryAsset()
    • getPrimaryCategory

      public Category getPrimaryCategory()
    • 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()
    • getTaxCode

      public String getTaxCode()
    • getMinimumThreshold

      public Integer getMinimumThreshold()
    • getMaximumThreshold

      public Integer getMaximumThreshold()
    • getDefaultVariant

      public Variant getDefaultVariant()
    • isHasVariants

      public boolean isHasVariants()
    • isSubscription

      public boolean isSubscription()
    • isAllowQtyEditAfterInitialPurchase

      public boolean isAllowQtyEditAfterInitialPurchase()
    • isAllowChangingBillingFrequency

      public boolean isAllowChangingBillingFrequency()
    • getUpgradeProductIds

      public List<String> getUpgradeProductIds()
    • getDowngradeProductIds

      public List<String> getDowngradeProductIds()
    • getRestrictDowngradeAfterDays

      public Integer getRestrictDowngradeAfterDays()
    • getMaxNumberOfActiveSubscriptions

      public Integer getMaxNumberOfActiveSubscriptions()
    • getFulfillmentWorkflow

      public DataDrivenEnum getFulfillmentWorkflow()
    • getCancellationPolicyRef

      public String getCancellationPolicyRef()
    • getPricingCategory

      public String getPricingCategory()
    • getVariantPricingStrategy

      public String getVariantPricingStrategy()
    • getCharacteristicsOverriddenHint

      public Boolean getCharacteristicsOverriddenHint()
    • 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)
    • setAutoRenewalEnabled

      public void setAutoRenewalEnabled(Boolean autoRenewalEnabled)
    • setAllowAutoRenewalModification

      public void setAllowAutoRenewalModification(Boolean allowAutoRenewalModification)
    • 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)
    • setVariantsToGenerate

      public void setVariantsToGenerate(List<Set<ProductOptionValueCombination>> variantsToGenerate)
    • setDefaultFrequency

      public void setDefaultFrequency(ProductRecurringFrequency defaultFrequency)
    • setTerms

      public void setTerms(List<ProductTerm> terms)
    • setPaymentStrategy

      public void setPaymentStrategy(String paymentStrategy)
    • setAttributes

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

      public void setCharacteristics(Map<String,ProductCharacteristic> characteristics)
    • setReviewsSummary

      public void setReviewsSummary(ReviewsSummary reviewsSummary)
    • setPrimaryAsset

      public void setPrimaryAsset(ProductAsset primaryAsset)
    • setPrimaryCategory

      public void setPrimaryCategory(Category primaryCategory)
    • 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)
    • setTaxCode

      public void setTaxCode(String taxCode)
    • setMinimumThreshold

      public void setMinimumThreshold(Integer minimumThreshold)
    • setMaximumThreshold

      public void setMaximumThreshold(Integer maximumThreshold)
    • setDefaultVariant

      public void setDefaultVariant(Variant defaultVariant)
    • setHasVariants

      public void setHasVariants(boolean hasVariants)
    • setSubscription

      public void setSubscription(boolean isSubscription)
    • setAllowQtyEditAfterInitialPurchase

      public void setAllowQtyEditAfterInitialPurchase(boolean allowQtyEditAfterInitialPurchase)
    • setAllowChangingBillingFrequency

      public void setAllowChangingBillingFrequency(boolean allowChangingBillingFrequency)
    • setUpgradeProductIds

      public void setUpgradeProductIds(List<String> upgradeProductIds)
    • setDowngradeProductIds

      public void setDowngradeProductIds(List<String> downgradeProductIds)
    • setRestrictDowngradeAfterDays

      public void setRestrictDowngradeAfterDays(Integer restrictDowngradeAfterDays)
    • setMaxNumberOfActiveSubscriptions

      public void setMaxNumberOfActiveSubscriptions(Integer maxNumberOfActiveSubscriptions)
    • setFulfillmentWorkflow

      public void setFulfillmentWorkflow(DataDrivenEnum fulfillmentWorkflow)
    • setCancellationPolicyRef

      public void setCancellationPolicyRef(String cancellationPolicyRef)
    • setPricingCategory

      public void setPricingCategory(String pricingCategory)
    • setVariantPricingStrategy

      public void setVariantPricingStrategy(String variantPricingStrategy)
    • setCharacteristicsOverriddenHint

      public void setCharacteristicsOverriddenHint(Boolean characteristicsOverriddenHint)