Class CompatiblePermutationNode
java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.CompatiblePermutationNode
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 Summary
ModifierConstructorDescriptionprotected
CompatiblePermutationNode
(OfferCombinabilityCriteria criteria, CompatiblePermutationNode parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static CompatiblePermutationNode
static CompatiblePermutationNode
getName()
The set of excluded ids from each CriteriaKey in the path.The set of offer ids being applied in this path so far.int
boolean
boolean
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.
-
Constructor Details
-
CompatiblePermutationNode
protected CompatiblePermutationNode() -
CompatiblePermutationNode
public CompatiblePermutationNode(OfferCombinabilityCriteria criteria, CompatiblePermutationNode parent)
-
-
Method Details
-
createRoot
-
createPlaceholder
-
isLeafElement
public boolean isLeafElement() -
addChildNode
-
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
-
getFullPathName
-
getTreeLevel
public int getTreeLevel() -
getChildNodes
-
getParentNode
-
getCombinabilityCriteria
-
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
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.
-