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
ConstructorDescriptionSpecificItemChoiceDetail
(SpecificItemChoice specificItemChoice, ProductDetails product, VariantDetail variant, PriceInfo priceInfo, Map<String, SpecificItemVariantPricingDetail> variantPricing) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getAsset()
javax.money.MonetaryAmount
javax.money.MonetaryAmount
Summary of thepricing information
related to the choice.If thegetType()
isDefaultSpecificItemChoiceType.PRODUCT
this holds the product for this choicegetType()
If thegetType()
isDefaultSpecificItemChoiceType.VARIANT
this holds the variant for this choiceMap of a variant to a price which is used to determine an override price for aSpecificItemChoice
that applies when specific variants are added to a cart.int
hashCode()
boolean
void
setAsset
(SpecificItemChoiceAsset asset) void
setDiscountAllowed
(boolean discountAllowed) void
setNameOverride
(String nameOverride) void
setOverridePrice
(javax.money.MonetaryAmount overridePrice) void
setPriceInfo
(PriceInfo priceInfo) Summary of thepricing information
related to the choice.void
setPricingKey
(String pricingKey) void
setProduct
(ProductDetails product) If thegetType()
isDefaultSpecificItemChoiceType.PRODUCT
this holds the product for this choicevoid
setSpecificItemChoice
(SpecificItemChoice specificItemChoice) void
void
setVariant
(VariantDetail variant) If thegetType()
isDefaultSpecificItemChoiceType.VARIANT
this holds the variant for this choicevoid
setVariantParentProductId
(String variantParentProductId) void
setVariantPricing
(Map<String, SpecificItemVariantPricingDetail> variantPricing) Map of a variant to a price which is used to determine an override price for aSpecificItemChoice
that applies when specific variants are added to a cart.void
setVariantPricingOverrides
(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.PRODUCT
this holds the product for this choice- Returns:
- the product representing this choice, or null if
getType()
is notDefaultSpecificItemChoiceType.PRODUCT
-
getVariant
If thegetType()
isDefaultSpecificItemChoiceType.VARIANT
this holds the variant for this choice- Returns:
- the variant representing this choice, or null if
getType()
is notDefaultSpecificItemChoiceType.VARIANT
-
getPriceInfo
Summary of thepricing information
related to the choice.- Returns:
- Summary of the
pricing information
related to the choice
-
getVariantPricing
Map of a variant to a price which is used to determine an override price for aSpecificItemChoice
that applies when specific variants are added to a cart.- Returns:
- Map of a
Variant
to an overridePriceInfo
inside theSpecificItemVariantPricingDetail
.
-
setSpecificItemChoice
-
setProduct
If thegetType()
isDefaultSpecificItemChoiceType.PRODUCT
this holds the product for this choice- Parameters:
product
- the product representing this choice
-
setVariant
If thegetType()
isDefaultSpecificItemChoiceType.VARIANT
this holds the variant for this choice- Parameters:
variant
- the variant representing this choice
-
setPriceInfo
Summary of thepricing information
related to the choice.- Parameters:
priceInfo
- Summary of thepricing information
related to the choice
-
setVariantPricing
Map of a variant to a price which is used to determine an override price for aSpecificItemChoice
that applies when specific variants are added to a cart.- Parameters:
variantPricing
- map of aVariant
to an overridePriceInfo
inside 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
-