Class CompatiblePermutationNode

java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.CompatiblePermutationNode

public class CompatiblePermutationNode extends Object
This class is used by the OfferProcessingContext to build a tree of compatible permutations. Each offer type has a set of permutations that share a OfferCombinabilityCriteriaKey. The leaf nodes of the tree and their parents represent a unique permutation of all offer types together. For example Order Offer O1 with Item Offers I1 & I2 might be one permutation whereas Order Offer O2 with Items Offers I1 and I3 might be another. This is different than the CompatibleOfferNode that is used to build compatible permutations across a single offer types.
  • Constructor Details

  • Method Details

    • createRoot

      public static CompatiblePermutationNode createRoot()
    • createPlaceholder

      public static CompatiblePermutationNode createPlaceholder(CompatiblePermutationNode parent)
    • isLeafElement

      public boolean isLeafElement()
    • addChildNode

      public void addChildNode(CompatiblePermutationNode node)
    • populateAllOffersPermutationFromNode

      public void populateAllOffersPermutationFromNode(CombinedTypesOfferPermutation allOffersPermutation)
      Given a specific node in the tree structure, the compatible list of offers can be found by including the offers from this node and all of its parents.
    • isPlaceHolderNode

      public boolean isPlaceHolderNode()
    • getName

      public String getName()
    • getFullPathName

      public String getFullPathName()
    • getTreeLevel

      public int getTreeLevel()
    • getChildNodes

      public List<CompatiblePermutationNode> getChildNodes()
    • getParentNode

      public CompatiblePermutationNode getParentNode()
    • getCombinabilityCriteria

      public OfferCombinabilityCriteria getCombinabilityCriteria()
    • getPathExcludedIds

      public Set<String> getPathExcludedIds()
      The set of excluded ids from each CriteriaKey in the path. For example, when processing fulfillment groups, this would represent all of the exclusions from both order and item.
    • getPathOfferIds

      public Set<String> getPathOfferIds()
      The set of offer ids being applied in this path so far. For example, when processing fulfillment groups, this would represent all of the offerIds from both the order and item selected permutations.