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 Details

    • ProductOptionDetail

      public ProductOptionDetail()
    • ProductOptionDetail

      public ProductOptionDetail(ProductOption productOption, ItemChoiceDetail itemChoice)
  • Method Details

    • compareTo

      public int compareTo(@NonNull @NonNull ProductOptionDetail o)
      Specified by:
      compareTo in interface Comparable<ProductOptionDetail>
    • getProductOption

      public ProductOption getProductOption()
    • getItemChoice

      public ItemChoiceDetail getItemChoice()
      Configuration for the DefaultProductOptionType.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

      public void setProductOption(ProductOption productOption)
    • setItemChoice

      public void setItemChoice(ItemChoiceDetail itemChoice)
      Configuration for the DefaultProductOptionType.ITEM_CHOICE. Drives customer selection of an additional item to add to their cart
      Parameters:
      itemChoice - configuration only when getType() is DefaultProductOptionType.ITEM_CHOICE
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAttribute

      public <T> T getAttribute(String name)
    • compareTo

      public int compareTo(ProductOption o)
    • getId

      public String getId()
    • getTemplateContextId

      public String getTemplateContextId()
    • isAddedByReference

      public boolean isAddedByReference()
    • getLabel

      public String getLabel()
    • getType

      public String getType()
    • getDisplayOrder

      public Integer getDisplayOrder()
    • getSearchOnOption

      public Boolean getSearchOnOption()
    • getAttributeChoice

      public AttributeChoice getAttributeChoice()
    • getAttributes

      public Map<String,Object> getAttributes()
    • getContextState

      public com.broadleafcommerce.data.tracking.core.EmbeddedContextState getContextState()
    • setId

      public void setId(String id)
    • setTemplateContextId

      public void setTemplateContextId(String templateContextId)
    • setAddedByReference

      public void setAddedByReference(boolean addedByReference)
    • setLabel

      public void setLabel(String label)
    • setType

      public void setType(String type)
    • setDisplayOrder

      public void setDisplayOrder(Integer displayOrder)
    • setSearchOnOption

      public void setSearchOnOption(Boolean searchOnOption)
    • setAttributeChoice

      public void setAttributeChoice(AttributeChoice attributeChoice)
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)