Class SpecificItemChoiceDetail
java.lang.Object
com.broadleafcommerce.catalog.domain.product.commerce.SpecificItemChoiceDetail
- All Implemented Interfaces:
Serializable
A version of
SpecificItemChoice tailored toward the needs of a commerce-facing product
details page.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpecificItemChoiceDetail(SpecificItemChoice specificItemChoice, ProductDetails product, VariantDetail variant, PriceInfo priceInfo, Map<String, SpecificItemVariantPricingDetail> variantPricing) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetAsset()javax.money.MonetaryAmountjavax.money.MonetaryAmountSummary of thepricing informationrelated to the choice.If thegetType()isDefaultSpecificItemChoiceType.PRODUCTthis holds the product for this choicegetType()If thegetType()isDefaultSpecificItemChoiceType.VARIANTthis holds the variant for this choiceMap of a variant to a price which is used to determine an override price for aSpecificItemChoicethat applies when specific variants are added to a cart.inthashCode()booleanvoidsetAsset(SpecificItemChoiceAsset asset) voidsetDiscountAllowed(boolean discountAllowed) voidsetNameOverride(String nameOverride) voidsetOverridePrice(javax.money.MonetaryAmount overridePrice) voidsetPriceInfo(PriceInfo priceInfo) Summary of thepricing informationrelated to the choice.voidsetPricingKey(String pricingKey) voidsetProduct(ProductDetails product) If thegetType()isDefaultSpecificItemChoiceType.PRODUCTthis holds the product for this choicevoidsetSpecificItemChoice(SpecificItemChoice specificItemChoice) voidvoidsetVariant(VariantDetail variant) If thegetType()isDefaultSpecificItemChoiceType.VARIANTthis holds the variant for this choicevoidsetVariantParentProductId(String variantParentProductId) voidsetVariantPricing(Map<String, SpecificItemVariantPricingDetail> variantPricing) Map of a variant to a price which is used to determine an override price for aSpecificItemChoicethat applies when specific variants are added to a cart.voidsetVariantPricingOverrides(List<SpecificItemVariantPricing> variantPricingOverrides) toString()
-
Constructor Details
-
SpecificItemChoiceDetail
public SpecificItemChoiceDetail(SpecificItemChoice specificItemChoice, ProductDetails product, VariantDetail variant, PriceInfo priceInfo, Map<String, SpecificItemVariantPricingDetail> variantPricing) -
SpecificItemChoiceDetail
public SpecificItemChoiceDetail()
-
-
Method Details
-
getSpecificItemChoice
-
getProduct
If thegetType()isDefaultSpecificItemChoiceType.PRODUCTthis holds the product for this choice- Returns:
- the product representing this choice, or null if
getType()is notDefaultSpecificItemChoiceType.PRODUCT
-
getVariant
If thegetType()isDefaultSpecificItemChoiceType.VARIANTthis holds the variant for this choice- Returns:
- the variant representing this choice, or null if
getType()is notDefaultSpecificItemChoiceType.VARIANT
-
getPriceInfo
Summary of thepricing informationrelated to the choice.- Returns:
- Summary of the
pricing informationrelated to the choice
-
getVariantPricing
Map of a variant to a price which is used to determine an override price for aSpecificItemChoicethat applies when specific variants are added to a cart.- Returns:
- Map of a
Variantto an overridePriceInfoinside theSpecificItemVariantPricingDetail.
-
setSpecificItemChoice
-
setProduct
If thegetType()isDefaultSpecificItemChoiceType.PRODUCTthis holds the product for this choice- Parameters:
product- the product representing this choice
-
setVariant
If thegetType()isDefaultSpecificItemChoiceType.VARIANTthis holds the variant for this choice- Parameters:
variant- the variant representing this choice
-
setPriceInfo
Summary of thepricing informationrelated to the choice.- Parameters:
priceInfo- Summary of thepricing informationrelated to the choice
-
setVariantPricing
Map of a variant to a price which is used to determine an override price for aSpecificItemChoicethat applies when specific variants are added to a cart.- Parameters:
variantPricing- map of aVariantto an overridePriceInfoinside theSpecificItemVariantPricingDetail.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getDefaultPrice
public javax.money.MonetaryAmount getDefaultPrice() -
getType
-
getVariantParentProductId
-
getNameOverride
-
isDiscountAllowed
public boolean isDiscountAllowed() -
getOverridePrice
public javax.money.MonetaryAmount getOverridePrice() -
getPricingKey
-
getAsset
-
getVariantPricingOverrides
-
setType
-
setVariantParentProductId
-
setNameOverride
-
setDiscountAllowed
public void setDiscountAllowed(boolean discountAllowed) -
setOverridePrice
public void setOverridePrice(javax.money.MonetaryAmount overridePrice) -
setPricingKey
-
setAsset
-
setVariantPricingOverrides
-