Class ProductOptionDetail
java.lang.Object
com.broadleafcommerce.catalog.domain.product.commerce.ProductOptionDetail
- All Implemented Interfaces:
Serializable
,Comparable<ProductOptionDetail>
public class ProductOptionDetail
extends Object
implements Comparable<ProductOptionDetail>, Serializable
A version of
ProductOption
tailored toward the needs of a commerce-facing product details
page.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
ConstructorDescriptionProductOptionDetail
(ProductOption productOption, ItemChoiceDetail itemChoice) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
int
compareTo
(@NonNull ProductOptionDetail o) int
boolean
<T> T
getAttribute
(String name) com.broadleafcommerce.data.tracking.core.EmbeddedContextState
getId()
Configuration for theDefaultProductOptionType.ITEM_CHOICE
.getLabel()
getType()
int
hashCode()
boolean
void
setAddedByReference
(boolean addedByReference) void
setAttributeChoice
(AttributeChoice attributeChoice) void
setAttributes
(Map<String, Object> attributes) void
setContextState
(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState) void
setDisplayOrder
(Integer displayOrder) void
void
setItemChoice
(ItemChoiceDetail itemChoice) Configuration for theDefaultProductOptionType.ITEM_CHOICE
.void
void
setProductOption
(ProductOption productOption) void
setSearchOnOption
(Boolean searchOnOption) void
setTemplateContextId
(String templateContextId) void
toString()
-
Constructor Details
-
ProductOptionDetail
public ProductOptionDetail() -
ProductOptionDetail
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ProductOptionDetail>
-
getProductOption
-
getItemChoice
Configuration for theDefaultProductOptionType.ITEM_CHOICE
. Drives customer selection of an additional item to add to their cart- Returns:
- configuration if the type of this option is an
DefaultProductOptionType.ITEM_CHOICE
, otherwise null
-
setProductOption
-
setItemChoice
Configuration for theDefaultProductOptionType.ITEM_CHOICE
. Drives customer selection of an additional item to add to their cart- Parameters:
itemChoice
- configuration only whengetType()
isDefaultProductOptionType.ITEM_CHOICE
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getAttribute
-
compareTo
-
getId
-
getTemplateContextId
-
isAddedByReference
public boolean isAddedByReference() -
getLabel
-
getType
-
getDisplayOrder
-
getSearchOnOption
-
getAttributeChoice
-
getAttributes
-
getContextState
public com.broadleafcommerce.data.tracking.core.EmbeddedContextState getContextState() -
setId
-
setTemplateContextId
-
setAddedByReference
public void setAddedByReference(boolean addedByReference) -
setLabel
-
setType
-
setDisplayOrder
-
setSearchOnOption
-
setAttributeChoice
-
setAttributes
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)
-