Class ProductDetails
java.lang.Object
com.broadleafcommerce.catalog.domain.product.commerce.ProductDetails
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionProductDetails
(Product product, List<ProductAsset> assets, List<Breadcrumb> breadcrumbs, List<IncludedProductDetail> includedProducts, List<ProductOptionDetail> options, PriceInfo priceInfo, List<VariantDetail> variants, Set<CategoryRef> parentCategories, Map<String, List<PromotionalProductSummary>> promotionalProducts, String vendorRef, List<ProductTagDetail> advancedTags) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
A list ofProductTags
sorted based on the sort position of theProductTag
for the product with ties broken byAdvancedTag.getPriority()
.AllProductAssets
for this product.<T> T
getAttribute
(String name) getBrand()
NavigationalBreadcrumbs
to show on the details view.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState
javax.money.MonetaryAmount
getCost()
javax.money.CurrencyUnit
javax.money.MonetaryAmount
getId()
Additional products that are always included with the product, no matter what.Used for SEO data in<meta description="">
in a product detail page.Used for SEO data in<title>
tag in a product detail page.javax.money.MonetaryAmount
getMsrp()
getName()
Drives additional information that the customer should enter when purchasing this product.AllCategories
that include the product.Summary of thepricing information
related to the product.javax.money.MonetaryAmount
Map of all of the relatedPromotionalProducts
grouped bytype
.javax.money.MonetaryAmount
getSku()
getTags()
getUpc()
getUri()
AllVariants
for this product.Soft reference to the vendor associated with this catalog.int
hashCode()
boolean
isActive()
boolean
boolean
boolean
boolean
boolean
Deprecated.boolean
isOnline()
boolean
isOnSale()
boolean
void
setActiveEndDate
(Instant activeEndDate) void
setActiveStartDate
(Instant activeStartDate) void
setAdvancedTags
(List<ProductTagDetail> advancedTags) A list ofProductTags
sorted based on the sort position of theProductTag
for the product with ties broken byAdvancedTag.getPriority()
.void
setAssets
(List<ProductAsset> assets) AllProductAssets
for this product.void
setAttributes
(Map<String, Attribute> attributes) void
setAvailableOnline
(boolean availableOnline) void
setBrand
(DataDrivenEnum brand) void
setBreadcrumbs
(List<Breadcrumb> breadcrumbs) NavigationalBreadcrumbs
to show on the details view.void
setBusinessType
(String businessType) void
setContextState
(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) void
setCost
(javax.money.MonetaryAmount cost) void
setCurrency
(javax.money.CurrencyUnit currency) void
setDefaultPrice
(javax.money.MonetaryAmount defaultPrice) void
setDefaultVariant
(Variant defaultVariant) void
setDescription
(String description) void
setDimension
(Dimensions dimension) void
setDiscountable
(boolean discountable) void
setDisplayTemplate
(String displayTemplate) void
setEligibleForPickup
(boolean eligibleForPickup) void
setExternalId
(String externalId) void
setFulfillmentFlatRates
(Map<String, FulfillmentFlatRate> fulfillmentFlatRates) void
void
setIncludedProducts
(List<IncludedProductDetail> includedProducts) Additional products that are always included with the product, no matter what.void
setIndividuallySold
(boolean individuallySold) void
setInventoryCheckStrategy
(String inventoryCheckStrategy) void
setInventoryReservationStrategy
(String inventoryReservationStrategy) void
setInventoryType
(String inventoryType) void
setKeywords
(List<String> keywords) void
setMaximumThreshold
(Integer maximumThreshold) void
setMerchandisingProduct
(boolean merchandisingProduct) Deprecated.void
setMerchandisingType
(DataDrivenEnum merchandisingType) void
setMergingType
(String mergingType) void
setMetaDescription
(String metaDescription) void
setMetaTitle
(String metaTitle) void
setMinimumThreshold
(Integer minimumThreshold) void
setMsrp
(javax.money.MonetaryAmount msrp) void
void
setOnline
(boolean online) void
setOptions
(List<ProductOptionDetail> options) Drives additional information that the customer should enter when purchasing this product.void
setParentCategories
(Set<CategoryRef> parentCategories) AllCategories
that include the product.void
setPriceInfo
(PriceInfo priceInfo) Summary of thepricing information
related to the product.void
setPricingKey
(String pricingKey) void
setPrimaryAsset
(ProductAsset primaryAsset) void
setPrimaryCategory
(Category primaryCategory) void
setProduct
(Product product) void
setProductType
(String productType) void
setPromotionalProducts
(Map<String, List<PromotionalProductSummary>> promotionalProducts) Map of all of the relatedPromotionalProducts
grouped bytype
.void
setReviewsSummary
(ReviewsSummary reviewsSummary) void
setSalePrice
(javax.money.MonetaryAmount salePrice) void
setSearchable
(boolean searchable) void
void
void
setTargetDemographic
(DataDrivenEnum targetDemographic) void
setTaxCode
(String taxCode) void
void
void
setVariants
(List<VariantDetail> variants) AllVariants
for this product.void
setVendorRef
(String vendorRef) Soft reference to the vendor associated with this catalog.void
toString()
-
Constructor Details
-
ProductDetails
public ProductDetails() -
ProductDetails
public ProductDetails(Product product, List<ProductAsset> assets, List<Breadcrumb> breadcrumbs, List<IncludedProductDetail> includedProducts, List<ProductOptionDetail> options, PriceInfo priceInfo, List<VariantDetail> variants, Set<CategoryRef> parentCategories, Map<String, List<PromotionalProductSummary>> promotionalProducts, String vendorRef, List<ProductTagDetail> advancedTags)
-
-
Method Details
-
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
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
-
getAssets
AllProductAssets
for this product.- Returns:
- All
ProductAssets
for this product.
-
getBreadcrumbs
NavigationalBreadcrumbs
to show on the details view.- Returns:
- Navigational
Breadcrumbs
to show on the details view.
-
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
Drives additional information that the customer should enter when purchasing this product. this can be in the form of additionalvariations
, 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
Summary of thepricing information
related to the product.- Returns:
- Summary of the
pricing information
related to the product
-
getVariants
AllVariants
for this product.- Returns:
- All
Variants
for this product.
-
getParentCategories
AllCategories
that include the product.- Returns:
- All
Categories
that include the product.
-
getPromotionalProducts
Map of all of the relatedPromotionalProducts
grouped bytype
.- Returns:
- Related
PromotionalProducts
grouped bytype
.
-
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
A list ofProductTags
sorted based on the sort position of theProductTag
for the product with ties broken byAdvancedTag.getPriority()
.- Returns:
- A list of
ProductTags
.
-
setProduct
-
setAssets
AllProductAssets
for this product.- Parameters:
assets
- AllProductAssets
for this product.
-
setBreadcrumbs
NavigationalBreadcrumbs
to show on the details view.- Parameters:
breadcrumbs
- NavigationalBreadcrumbs
to show on the details view.
-
setIncludedProducts
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
Drives additional information that the customer should enter when purchasing this product. this can be in the form of additionalvariations
, 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
Summary of thepricing information
related to the product.- Parameters:
priceInfo
- Summary of thepricing information
related to the product
-
setVariants
AllVariants
for this product.- Parameters:
variants
- AllVariants
for this product.
-
setParentCategories
AllCategories
that include the product.- Parameters:
parentCategories
- AllCategories
that include the product.
-
setPromotionalProducts
Map of all of the relatedPromotionalProducts
grouped bytype
.- Parameters:
promotionalProducts
- RelatedPromotionalProducts
grouped bytype
.
-
setVendorRef
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
A list ofProductTags
sorted based on the sort position of theProductTag
for the product with ties broken byAdvancedTag.getPriority()
.- Parameters:
advancedTags
- A list ofProductTags
.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getAttribute
-
isActive
public boolean isActive() -
isOnSale
public boolean isOnSale() -
getBusinessType
-
getPriceWithDependentItems
public javax.money.MonetaryAmount getPriceWithDependentItems() -
getId
-
getName
-
getUri
-
getDescription
-
getSku
-
getUpc
-
getExternalId
-
getCurrency
public javax.money.CurrencyUnit getCurrency() -
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
-
isOnline
public boolean isOnline() -
isDiscountable
public boolean isDiscountable() -
getInventoryType
-
getMergingType
-
isAvailableOnline
public boolean isAvailableOnline() -
getInventoryCheckStrategy
-
getInventoryReservationStrategy
-
isEligibleForPickup
public boolean isEligibleForPickup() -
getFulfillmentFlatRates
-
getActiveStartDate
-
getActiveEndDate
-
getDimension
-
getWeight
-
isSearchable
public boolean isSearchable() -
isIndividuallySold
public boolean isIndividuallySold() -
isMerchandisingProduct
Deprecated. -
getProductType
-
getKeywords
-
getAttributes
-
getReviewsSummary
-
getPrimaryAsset
-
getPrimaryCategory
-
getTags
-
getBrand
-
getMerchandisingType
-
getTargetDemographic
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState() -
getTaxCode
-
getMinimumThreshold
-
getMaximumThreshold
-
getDefaultVariant
-
setId
-
setName
-
setUri
-
setDescription
-
setSku
-
setUpc
-
setExternalId
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) -
setPricingKey
-
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
-
setMetaDescription
-
setDisplayTemplate
-
setOnline
public void setOnline(boolean online) -
setDiscountable
public void setDiscountable(boolean discountable) -
setInventoryType
-
setMergingType
-
setAvailableOnline
public void setAvailableOnline(boolean availableOnline) -
setInventoryCheckStrategy
-
setInventoryReservationStrategy
-
setEligibleForPickup
public void setEligibleForPickup(boolean eligibleForPickup) -
setFulfillmentFlatRates
-
setActiveStartDate
-
setActiveEndDate
-
setDimension
-
setWeight
-
setSearchable
public void setSearchable(boolean searchable) -
setIndividuallySold
public void setIndividuallySold(boolean individuallySold) -
setMerchandisingProduct
Deprecated. -
setProductType
-
setBusinessType
-
setKeywords
-
setAttributes
-
setReviewsSummary
-
setPrimaryAsset
-
setPrimaryCategory
-
setTags
-
setBrand
-
setMerchandisingType
-
setTargetDemographic
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) -
setTaxCode
-
setMinimumThreshold
-
setMaximumThreshold
-
setDefaultVariant
-