Interface ProductOptionValue
- All Superinterfaces:
org.broadleafcommerce.common.copy.MultiTenantCloneable<ProductOptionValue>,Serializable
- All Known Implementing Classes:
ProductOptionValueImpl
public interface ProductOptionValue
extends Serializable, org.broadleafcommerce.common.copy.MultiTenantCloneable<ProductOptionValue>
Stores the values for a given product option.
For example, a ProductOption of type "color" might have values of ("red","blue").
ProductOptionValues can also have a price adjustment associated with it which will be automatically added to the Sku retail price and sale price
- Author:
- bpolster.
-
Method Summary
Modifier and TypeMethodDescriptionGets the option value.Returns the order that the option value should be displayed in.getId()Returns unique identifier of the product option value.org.broadleafcommerce.common.money.MoneyGets the price adjustment associated with this value.org.broadleafcommerce.common.money.MoneyRetrieve the Product Option's price adjustment without dynamic pricing applied.Returns the associated ProductOptionGets the option value.voidsetAttributeValue(String attributeValue) Sets the option value.voidsetDisplayOrder(Long order) Sets the display order.voidSets the unique identifier of the product option value.voidsetPriceAdjustment(org.broadleafcommerce.common.money.Money priceAdjustment) Gets the price adjustment associated with this value.voidsetProductOption(ProductOption productOption) Sets the associated product option.Methods inherited from interface org.broadleafcommerce.common.copy.MultiTenantCloneable
createOrRetrieveCopyInstance
-
Method Details
-
getId
Long getId()Returns unique identifier of the product option value.- Returns:
-
setId
Sets the unique identifier of the product option value.- Parameters:
id-
-
getAttributeValue
String getAttributeValue()Gets the option value. (e.g. "red") This method uses dynamic translation for the current locale.- Returns:
-
setAttributeValue
Sets the option value. (e.g. "red")- Parameters:
attributeValue-
-
getRawAttributeValue
String getRawAttributeValue()Gets the option value. (e.g. "red") This method does not use dynamic translation for the current locale. Instead it returns the raw value.- Returns:
-
getDisplayOrder
Long getDisplayOrder()Returns the order that the option value should be displayed in.- Returns:
-
setDisplayOrder
Sets the display order.- Parameters:
order-
-
getPriceAdjustment
org.broadleafcommerce.common.money.Money getPriceAdjustment()Gets the price adjustment associated with this value. For instance, if this ProductOptionValue represented an extra-large shirt, that might be a $1 upcharge. This adjustments will be automatically added to the Sku retail price and sale price.This may be a negative value if you wanted to offer a particular ProductOptionValue at a discount
Depending on the implementation, this may perform dynamic pricing, which influences the value returned by examining price lists for the product option.
To retrieve the price adjustment without dynamic pricing applied, see
getPriceAdjustmentSkipDynamicPricing().- Returns:
- The price adjustment for this product option, with dynamic pricing applied, if applicable.
-
setPriceAdjustment
void setPriceAdjustment(org.broadleafcommerce.common.money.Money priceAdjustment) Gets the price adjustment associated with this value. For instance, if this ProductOptionValue represented an extra-large shirt, that might be a $1 upcharge. These adjustments will be automatically added to the Sku retail price and sale price. To offer this particular ProductOptionValue at a discount, you could also provide a negative value here- Parameters:
priceAdjustment-
-
getPriceAdjustmentSkipDynamicPricing
org.broadleafcommerce.common.money.Money getPriceAdjustmentSkipDynamicPricing()Retrieve the Product Option's price adjustment without dynamic pricing applied.- Returns:
- The price adjustment for this product option.
- See Also:
-
getProductOption
ProductOption getProductOption()Returns the associated ProductOption- Returns:
-
setProductOption
Sets the associated product option.- Parameters:
productOption-
-