Enum Class CombinabilityType

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

public enum CombinabilityType extends Enum<CombinabilityType>
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).
  • Enum Constant Details

    • DEFAULT

      public static final CombinabilityType DEFAULT
      Represents the default CombinabilityType for a DiscountTargetType. For ORDER_ITEM target types, the default is ANY. For all other types, the default is OTHER_TYPE.
    • ANY

      public static final CombinabilityType ANY
      A.K.A, combinable. Determines that the offer can be combined with any other offer.
    • OTHER_TYPE

      public static final CombinabilityType OTHER_TYPE
      A.K.A., non-combinable. Determines that the offer can only be combined with offers that have different discount target types. Thus, if the offer's discount target type is DiscountTargetType.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., an DiscountTargetType.ORDER targeting offer).
    • NONE

      public static final CombinabilityType NONE
      A.K.A, totalitarian. Determines that the offer is the only offer that can be applied. Whereas OTHER_TYPE only excludes offers with the same discount target type, totalitarian offers also exclude any other offer even if the target type is different.
  • Method Details

    • values

      public static CombinabilityType[] 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 CombinabilityType 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
    • isDefaultCombinabilityType

      public static boolean isDefaultCombinabilityType(String combinabilityType)
    • isAnyCombinabilityType

      public static boolean isAnyCombinabilityType(String combinabilityType)
    • isOtherTypeCombinabilityType

      public static boolean isOtherTypeCombinabilityType(String combinabilityType)
    • isNoneCombinabilityType

      public static boolean isNoneCombinabilityType(String combinabilityType)