Enum Class CombinabilityOverrideType

java.lang.Object
java.lang.Enum<CombinabilityOverrideType>
com.broadleafcommerce.promotion.offer.domain.type.CombinabilityOverrideType
All Implemented Interfaces:
Serializable, Comparable<CombinabilityOverrideType>, Constable

public enum CombinabilityOverrideType extends Enum<CombinabilityOverrideType>
Enumerates the combinability override options for an CombinabilityOverride. Offers have two related properties Offer.getCombinabilityType() which drives the default combinability strategy and Offer.isStackable() which determines if an offer can be stacked with another offer . The CombinabilityOverride allows a given offer to explicitly add stackability or combinability with another offer or to explicitly remove combinability with another offer. As the setup allows conflicting settings, the most restrictive OVERRIDE always wins. For example, if "Offer A" has an override of type STACKABLE with "Offer B" but "Offer B" has an override of type "NON_COMBINABLE" with "Offer A", the promotion engine will use the explicit NON_COMBINABLE setting.
Author:
Brian Polster (bpolster).
  • Enum Constant Details

    • COMBINABLE

      public static final CombinabilityOverrideType COMBINABLE
      Specify that the two specific offers can be used in the same order. This setting is useful to mark specific offers that can co-exist within an offer. It also is an effective way to mark that a specific offer combination is not stackable. Note that COMBINABLE differs from STACKABLE in that the two offers can apply in the same order but not to the same target. To be clear you could have two item offers targeting different items but they would not BOTH apply to the same item unless one was stackable.
    • STACKABLE

      public static final CombinabilityOverrideType STACKABLE
      Specify that this offer can be stacked with the other offer such that discounts from both offers will apply.
    • NOT_COMBINABLE

      public static final CombinabilityOverrideType NOT_COMBINABLE
      Override so that these two offers will not apply within the same order.
  • Method Details

    • values

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

      public static CombinabilityOverrideType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null