Enum Class CombinabilityType
java.lang.Object
java.lang.Enum<CombinabilityType>
com.broadleafcommerce.promotion.offer.domain.type.CombinabilityType
- All Implemented Interfaces:
Serializable
,Comparable<CombinabilityType>
,Constable
Enumerates the combinability options for an
Offer
. By default, an offer can be combined
with any other offer. However, this could changed so that an offer is the only
order item targeting
offer that can be applied to an
order's applicable items, or that no other offer can be applied at all to the order
(NONE
.- Author:
- Nathan Moore (nathanmoore).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionA.K.A, combinable.Represents the default CombinabilityType for aDiscountTargetType
.A.K.A, totalitarian.A.K.A., non-combinable. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isAnyCombinabilityType
(String combinabilityType) static boolean
isDefaultCombinabilityType
(String combinabilityType) static boolean
isNoneCombinabilityType
(String combinabilityType) static boolean
isOtherTypeCombinabilityType
(String combinabilityType) static CombinabilityType
Returns the enum constant of this class with the specified name.static CombinabilityType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Represents the default CombinabilityType for aDiscountTargetType
. For ORDER_ITEM target types, the default is ANY. For all other types, the default is OTHER_TYPE. -
ANY
A.K.A, combinable. Determines that the offer can be combined with any other offer. -
OTHER_TYPE
A.K.A., non-combinable. Determines that the offer can only be combined with offers that have differentdiscount target types
. Thus, if the offer's discount target type isDiscountTargetType.ORDER_ITEM
, it is the only offer with that discount target that can be used on that order's items. However, any other offers can still be applied (e.g., anDiscountTargetType.ORDER
targeting offer). -
NONE
A.K.A, totalitarian. Determines that the offer is the only offer that can be applied. WhereasOTHER_TYPE
only excludes offers with the samediscount target type
, totalitarian offers also exclude any other offer even if the target type is different.
-
-
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
-
isDefaultCombinabilityType
-
isAnyCombinabilityType
-
isOtherTypeCombinabilityType
-
isNoneCombinabilityType
-