Class ProductDetails
- All Implemented Interfaces:
Serializable
- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProductDetails(Product product, List<ProductAsset> assets, List<Breadcrumb> breadcrumbs, List<IncludedProductDetail> includedProducts, List<ProductOptionDetail> options, PriceInfo priceInfo, List<VariantDetail> variants, Set<CategoryRef> parentCategories, List<String> categoryIdsWithParents, Map<String, List<PromotionalProductSummary>> promotionalProducts, String vendorRef, List<ProductTagDetail> advancedTags, Map<String, Characteristic> parentCharacteristics) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanA list ofProductTagssorted based on the sort position of theProductTagfor the product with ties broken byAdvancedTag.getPriority().AllProductAssetsfor this product.<T> TgetAttribute(String name) getBrand()NavigationalBreadcrumbsto show on the details view.List of all hierarchical parent category ids for the product.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStatejavax.money.MonetaryAmountgetCost()javax.money.CurrencyUnitjavax.money.MonetaryAmountgetId()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.MonetaryAmountgetMsrp()getName()Drives additional information that the customer should enter when purchasing this product.AllCategoriesthat include the product.Map of theCharacteristicsreferenced by theProductCharacteristicswhere the key is the characteristic'sfieldName.Summary of thepricing informationrelated to the product.javax.money.MonetaryAmountMap of all of the relatedPromotionalProductsgrouped bytype.javax.money.MonetaryAmountgetSku()getTags()getTerms()getUpc()getUri()AllVariantsfor this product.Soft reference to the vendor associated with this catalog.inthashCode()booleanisActive()booleanbooleanbooleanbooleanbooleanbooleanDeprecated.booleanisOnline()booleanisOnSale()booleanvoidsetActiveEndDate(Instant activeEndDate) voidsetActiveStartDate(Instant activeStartDate) voidsetAdvancedTags(List<ProductTagDetail> advancedTags) A list ofProductTagssorted based on the sort position of theProductTagfor the product with ties broken byAdvancedTag.getPriority().voidsetAssets(List<ProductAsset> assets) AllProductAssetsfor this product.voidsetAttributes(Map<String, Attribute> attributes) voidsetAvailableOnline(boolean availableOnline) voidsetBrand(DataDrivenEnum brand) voidsetBreadcrumbs(List<Breadcrumb> breadcrumbs) NavigationalBreadcrumbsto show on the details view.voidsetBusinessType(String businessType) voidsetCategoryIdsWithParents(List<String> categoryIdsWithParents) List of all hierarchical parent category ids for the product.voidsetCharacteristics(Map<String, ProductCharacteristic> characteristics) voidsetCharacteristicsFromList(List<ProductCharacteristic> characteristics) voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) voidsetCost(javax.money.MonetaryAmount cost) voidsetCurrency(javax.money.CurrencyUnit currency) voidsetDefaultPrice(javax.money.MonetaryAmount defaultPrice) voidsetDefaultVariant(Variant defaultVariant) voidsetDescription(String description) voidsetDimension(Dimensions dimension) voidsetDiscountable(boolean discountable) voidsetDisplayTemplate(String displayTemplate) voidsetEligibleForPickup(boolean eligibleForPickup) voidsetExternalId(String externalId) voidsetFulfillmentFlatRates(Map<String, FulfillmentFlatRate> fulfillmentFlatRates) voidsetHasVariants(boolean hasVariants) voidvoidsetIncludedProducts(List<IncludedProductDetail> includedProducts) Additional products that are always included with the product, no matter what.voidsetIndividuallySold(boolean individuallySold) voidsetInventoryCheckStrategy(String inventoryCheckStrategy) voidsetInventoryReservationStrategy(String inventoryReservationStrategy) voidsetInventoryType(String inventoryType) voidsetKeywords(List<String> keywords) voidsetMaximumThreshold(Integer maximumThreshold) voidsetMerchandisingProduct(boolean merchandisingProduct) Deprecated.voidsetMerchandisingType(DataDrivenEnum merchandisingType) voidsetMergingType(String mergingType) voidsetMetaDescription(String metaDescription) voidsetMetaTitle(String metaTitle) voidsetMinimumThreshold(Integer minimumThreshold) voidsetMsrp(javax.money.MonetaryAmount msrp) voidvoidsetOnline(boolean online) voidsetOptions(List<ProductOptionDetail> options) Drives additional information that the customer should enter when purchasing this product.voidsetParentCategories(Set<CategoryRef> parentCategories) AllCategoriesthat include the product.voidsetParentCharacteristics(Map<String, Characteristic> parentCharacteristics) Map of theCharacteristicsreferenced by theProductCharacteristicswhere the key is the characteristic'sfieldName.voidsetPriceInfo(PriceInfo priceInfo) Summary of thepricing informationrelated to the product.voidsetPricingKey(String pricingKey) voidsetPrimaryAsset(ProductAsset primaryAsset) voidsetPrimaryCategory(Category primaryCategory) voidsetProduct(Product product) voidsetProductType(String productType) voidsetPromotionalProducts(Map<String, List<PromotionalProductSummary>> promotionalProducts) Map of all of the relatedPromotionalProductsgrouped bytype.voidsetReviewsSummary(ReviewsSummary reviewsSummary) voidsetSalePrice(javax.money.MonetaryAmount salePrice) voidsetSearchable(boolean searchable) voidvoidvoidsetTargetDemographic(DataDrivenEnum targetDemographic) voidsetTaxCode(String taxCode) voidsetTerms(List<ProductTerm> terms) voidvoidvoidsetVariants(List<VariantDetail> variants) AllVariantsfor this product.voidsetVariantsToGenerate(List<Set<ProductOptionValueCombination>> variantsToGenerate) voidsetVendorRef(String vendorRef) Soft reference to the vendor associated with this catalog.voidtoString()
-
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, List<String> categoryIdsWithParents, Map<String, List<PromotionalProductSummary>> promotionalProducts, String vendorRef, List<ProductTagDetail> advancedTags, Map<String, Characteristic> parentCharacteristics)
-
-
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
AllProductAssetsfor this product.- Returns:
- All
ProductAssetsfor this product.
-
getBreadcrumbs
NavigationalBreadcrumbsto show on the details view.- Returns:
- Navigational
Breadcrumbsto 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
optionsinstead.- 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 informationrelated to the product.- Returns:
- Summary of the
pricing informationrelated to the product
-
getVariants
AllVariantsfor this product.- Returns:
- All
Variantsfor this product.
-
getParentCategories
AllCategoriesthat include the product.- Returns:
- All
Categoriesthat include the product.
-
getCategoryIdsWithParents
List of all hierarchical parent category ids for the product.This is different from
parentCategoriesasparentCategoriesrepresents the categories that are directly assigned to the product, whereascategoryIdsWithParentscontains 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
Map of all of the relatedPromotionalProductsgrouped bytype.- Returns:
- Related
PromotionalProductsgrouped 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 ofProductTagssorted based on the sort position of theProductTagfor the product with ties broken byAdvancedTag.getPriority().- Returns:
- A list of
ProductTags.
-
getParentCharacteristics
Map of theCharacteristicsreferenced by theProductCharacteristicswhere the key is the characteristic'sfieldName. This is used instead of hydrating directly onto eachProductCharacteristicto reduce duplication and payload size.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
setProduct
-
setAssets
AllProductAssetsfor this product.- Parameters:
assets- AllProductAssetsfor this product.
-
setBreadcrumbs
NavigationalBreadcrumbsto show on the details view.- Parameters:
breadcrumbs- NavigationalBreadcrumbsto 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
optionsinstead.- 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 informationrelated to the product.- Parameters:
priceInfo- Summary of thepricing informationrelated to the product
-
setVariants
AllVariantsfor this product.- Parameters:
variants- AllVariantsfor this product.
-
setParentCategories
AllCategoriesthat include the product.- Parameters:
parentCategories- AllCategoriesthat include the product.
-
setCategoryIdsWithParents
List of all hierarchical parent category ids for the product.This is different from
parentCategoriesasparentCategoriesrepresents the categories that are directly assigned to the product, whereascategoryIdsWithParentscontains 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
Map of all of the relatedPromotionalProductsgrouped bytype.- Parameters:
promotionalProducts- RelatedPromotionalProductsgrouped 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 ofProductTagssorted based on the sort position of theProductTagfor the product with ties broken byAdvancedTag.getPriority().- Parameters:
advancedTags- A list ofProductTags.
-
setParentCharacteristics
Map of theCharacteristicsreferenced by theProductCharacteristicswhere the key is the characteristic'sfieldName. This is used instead of hydrating directly onto eachProductCharacteristicto reduce duplication and payload size.- Since:
- Catalog Service 2.2.0, Release Train 2.2.0
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getAttribute
-
isActive
public boolean isActive() -
isOnSale
public boolean isOnSale() -
getBusinessType
-
setCharacteristicsFromList
-
getCharacteristicsValues
-
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
-
getVariantsToGenerate
-
getTerms
-
getAttributes
-
getCharacteristics
-
getReviewsSummary
-
getPrimaryAsset
-
getPrimaryCategory
-
getTags
-
getBrand
-
getMerchandisingType
-
getTargetDemographic
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState() -
getTaxCode
-
getMinimumThreshold
-
getMaximumThreshold
-
getDefaultVariant
-
isHasVariants
public boolean isHasVariants() -
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
-
setVariantsToGenerate
-
setTerms
-
setAttributes
-
setCharacteristics
-
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
-
setHasVariants
public void setHasVariants(boolean hasVariants)
-