Class VariantDetail
java.lang.Object
com.broadleafcommerce.catalog.domain.product.commerce.VariantDetail
- All Implemented Interfaces:
Serializable
A version of
Variant tailored toward the needs of a commerce-facing product details page.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVariantDetail(Variant variant, PriceInfo priceInfo, String vendorRef, List<ProductTag> advancedTags) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe product tags associated with this variant.<T> TgetAttribute(String name) com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStatejavax.money.MonetaryAmountgetCost()javax.money.MonetaryAmountgetId()getName()com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainerSummary of thepricing informationrelated to the variant.javax.money.MonetaryAmountgetSku()getUpc()Soft reference to the vendor associated with this catalog.inthashCode()booleanisActive()booleanbooleanisOnline()booleanisOnSale()voidsetActiveEndDate(Instant activeEndDate) voidsetActiveStartDate(Instant activeStartDate) voidsetAdvancedTags(List<ProductTag> advancedTags) The product tags associated with this variant.voidsetAttributes(Map<String, Attribute> attributes) voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) voidsetCost(javax.money.MonetaryAmount cost) voidsetDefaultPrice(javax.money.MonetaryAmount defaultPrice) voidsetDescription(String description) voidsetDimension(Dimensions dimension) voidsetDiscountable(boolean discountable) voidsetExternalId(String externalId) voidsetFulfillmentFlatRates(Map<String, FulfillmentFlatRate> fulfillmentFlatRates) voidvoidsetInventoryCheckStrategy(String inventoryCheckStrategy) voidsetInventoryReservationStrategy(String inventoryReservationStrategy) voidsetMaximumThreshold(Integer maximumThreshold) voidsetMinimumThreshold(Integer minimumThreshold) voidvoidsetOnline(boolean online) voidsetOptionValues(Map<String, String> optionValues) voidsetOverrideChangeContainer(com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer overrideChangeContainer) voidsetPriceInfo(PriceInfo priceInfo) Summary of thepricing informationrelated to the variant.voidsetProductId(String productId) voidsetReviewsSummary(ReviewsSummary reviewsSummary) voidsetSalePrice(javax.money.MonetaryAmount salePrice) voidvoidsetTaxCode(String taxCode) voidvoidsetVariant(Variant variant) voidsetVendorRef(String vendorRef) Soft reference to the vendor associated with this catalog.voidtoString()
-
Constructor Details
-
VariantDetail
public VariantDetail(Variant variant, PriceInfo priceInfo, String vendorRef, List<ProductTag> advancedTags) -
VariantDetail
public VariantDetail()
-
-
Method Details
-
getVariant
-
getPriceInfo
Summary of thepricing informationrelated to the variant.- Returns:
- Summary of the
pricing informationrelated to the variant
-
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
The product tags associated with this variant. Must be hydrated.- Returns:
- The tags associated with this variant
-
setVariant
-
setPriceInfo
Summary of thepricing informationrelated to the variant.- Parameters:
priceInfo- Summary of thepricing informationrelated to the variant
-
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
The product tags associated with this variant. Must be hydrated.- Parameters:
productTags- The tags associated with this variant
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getAttribute
-
isActive
public boolean isActive() -
isOnSale
public boolean isOnSale() -
getId
-
getSku
-
getUpc
-
getExternalId
-
getName
-
getDescription
-
getActiveStartDate
-
getActiveEndDate
-
getDefaultPrice
public javax.money.MonetaryAmount getDefaultPrice() -
getSalePrice
public javax.money.MonetaryAmount getSalePrice() -
getCost
public javax.money.MonetaryAmount getCost() -
getDimension
-
getWeight
-
isOnline
public boolean isOnline() -
isDiscountable
public boolean isDiscountable() -
getProductId
-
getOptionValues
-
getInventoryCheckStrategy
-
getInventoryReservationStrategy
-
getReviewsSummary
-
getMinimumThreshold
-
getMaximumThreshold
-
getFulfillmentFlatRates
-
getAttributes
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState() -
getTaxCode
-
getOverrideChangeContainer
public com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer getOverrideChangeContainer() -
setId
-
setSku
-
setUpc
-
setExternalId
-
setName
-
setDescription
-
setActiveStartDate
-
setActiveEndDate
-
setDefaultPrice
public void setDefaultPrice(javax.money.MonetaryAmount defaultPrice) -
setSalePrice
public void setSalePrice(javax.money.MonetaryAmount salePrice) -
setCost
public void setCost(javax.money.MonetaryAmount cost) -
setDimension
-
setWeight
-
setOnline
public void setOnline(boolean online) -
setDiscountable
public void setDiscountable(boolean discountable) -
setProductId
-
setOptionValues
-
setInventoryCheckStrategy
-
setInventoryReservationStrategy
-
setReviewsSummary
-
setMinimumThreshold
-
setMaximumThreshold
-
setFulfillmentFlatRates
-
setAttributes
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) -
setTaxCode
-
setOverrideChangeContainer
public void setOverrideChangeContainer(com.broadleafcommerce.data.tracking.core.filtering.domain.ChangeContainer overrideChangeContainer)
-