Enum Class CombinabilityOverrideType
java.lang.Object
java.lang.Enum<CombinabilityOverrideType>
com.broadleafcommerce.promotion.offer.domain.type.CombinabilityOverrideType
- All Implemented Interfaces:
Serializable
,Comparable<CombinabilityOverrideType>
,Constable
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).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionSpecify that the two specific offers can be used in the same order.Override so that these two offers will not apply within the same order.Specify that this offer can be stacked with the other offer such that discounts from both offers will apply. -
Method Summary
Modifier and TypeMethodDescriptionstatic CombinabilityOverrideType
Returns the enum constant of this class with the specified name.static CombinabilityOverrideType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
Specify that this offer can be stacked with the other offer such that discounts from both offers will apply. -
NOT_COMBINABLE
Override so that these two offers will not apply within the same order.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-