Enum DefaultProductOptionType

java.lang.Object
java.lang.Enum<DefaultProductOptionType>
com.broadleafcommerce.catalog.domain.product.option.type.DefaultProductOptionType
All Implemented Interfaces:
Serializable, Comparable<DefaultProductOptionType>

public enum DefaultProductOptionType extends Enum<DefaultProductOptionType>
Out of the box forms that a ProductOption can take. For more information on the types see the documentation for product options.
Author:
Phillip Verheyden (phillipuniverse)
  • Enum Constant Details

    • VARIANT_DISTINGUISHING

      public static final DefaultProductOptionType VARIANT_DISTINGUISHING
      Values selected by the customer will help distinguish a specific variant directly on this Product that should be added to the cart. Example would be to set up t-shirts with colors and sizes. This is similar to #ITEM_ATTRIBUTE in that the values the user selected are stored in the item attributes.
    • ITEM_CHOICE

      public static final DefaultProductOptionType ITEM_CHOICE
      Allows the user to select an additional item that is added to their cart
    • CART_ITEM_ATTRIBUTE

      public static final DefaultProductOptionType CART_ITEM_ATTRIBUTE
      The user value is intended to flow into an item attribute once this item is added to the cart.
    • CART_ATTRIBUTE

      public static final DefaultProductOptionType CART_ATTRIBUTE
      The user input flow into a global cart-level attribute when added to cart. If there was already an entry for this attribute, it is overridden with the latest value
  • Method Details

    • values

      public static DefaultProductOptionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static DefaultProductOptionType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • isVariantDistinguishingProductOption

      public static boolean isVariantDistinguishingProductOption(String productOptionType)
    • isItemChoiceProductOption

      public static boolean isItemChoiceProductOption(String productOptionType)
    • isCartItemAttributeProductOption

      public static boolean isCartItemAttributeProductOption(String productOptionType)
    • isCartAttributeProductOption

      public static boolean isCartAttributeProductOption(String productOptionType)