Class CandidateOffers

java.lang.Object
com.broadleafcommerce.promotion.offer.service.dto.CandidateOffers
All Implemented Interfaces:
Serializable

public class CandidateOffers extends Object implements Serializable
DTO containing the candidate offers broken out into groups based on an offer's Discount.getTargetType() }.
Author:
Nathan Moore (nathanmoore).
See Also:
  • Constructor Details

    • CandidateOffers

      public CandidateOffers()
  • Method Details

    • initializeCandidateOfferForProcessing

      public void initializeCandidateOfferForProcessing(BaseCandidateOffer offer, EnhancedOrder order)
      Adds the offer to the relevant collections used by the offer engine.
      Parameters:
      offer -
    • populateCombinabilityStructures

      public void populateCombinabilityStructures()
    • distributeExclusions

      public void distributeExclusions()
      In the admin, a user can specify an exclusion from either side of the offer. The offer engine needs to process the exclusions from either side. This method makes sure that if Offer A excludes B that Offer B also excludes A.
    • isEmpty

      public boolean isEmpty()
    • getOtherTypeOfferIdsList

      public Map<String,Set<String>> getOtherTypeOfferIdsList()
      For combinability algorithms, it is helpful to know the ids of all other offer types. For example, an order offer needs to know the ids of all item and fulfillment offers to see which ones it can be combined with.
    • getAllOfferIds

      public Set<String> getAllOfferIds()
      Set of ids for all offers that are applicable to a given offer engine execution.
    • getAllCandidateOffers

      public List<BaseCandidateOffer> getAllCandidateOffers()
      A set of all the relevant candidate offers for given offer engine execution
    • getCandidateOrderItemOffers

      public List<CandidateItemOffer> getCandidateOrderItemOffers()
      List of candidate offers targeting order items.
      Returns:
      List of candidate offers targeting order items.
      See Also:
    • getCandidateOrderOffers

      public List<CandidateOrderOffer> getCandidateOrderOffers()
      List of candidate offers targeting orders.
      Returns:
      List of candidate offers targeting orders.
      See Also:
    • getCandidateFulfillmentGroupOffers

      public List<CandidateFulfillmentGroupOffer> getCandidateFulfillmentGroupOffers()
      List of candidate offers targeting fulfillment groups.
      Returns:
      List of candidate offers targeting fulfillment groups.
      See Also:
    • getCandidateFulfillmentItemOffers

      public List<CandidateItemOffer> getCandidateFulfillmentItemOffers()
      List of candidate offers targeting fulfillment items.
      Returns:
      List of candidate offers targeting fulfillment items.
      See Also:
    • setOtherTypeOfferIdsList

      public void setOtherTypeOfferIdsList(Map<String,Set<String>> otherTypeOfferIdsList)
      For combinability algorithms, it is helpful to know the ids of all other offer types. For example, an order offer needs to know the ids of all item and fulfillment offers to see which ones it can be combined with.
    • setAllOfferIds

      public void setAllOfferIds(Set<String> allOfferIds)
      Set of ids for all offers that are applicable to a given offer engine execution.
    • setAllCandidateOffers

      public void setAllCandidateOffers(List<BaseCandidateOffer> allCandidateOffers)
      A set of all the relevant candidate offers for given offer engine execution
    • setCandidateOrderItemOffers

      public void setCandidateOrderItemOffers(List<CandidateItemOffer> candidateOrderItemOffers)
      List of candidate offers targeting order items.
      Parameters:
      candidateOrderItemOffers - List of candidate offers targeting order items.
      See Also:
    • setCandidateOrderOffers

      public void setCandidateOrderOffers(List<CandidateOrderOffer> candidateOrderOffers)
      List of candidate offers targeting orders.
      Parameters:
      candidateOrderOffers - List of candidate offers targeting orders.
      See Also:
    • setCandidateFulfillmentGroupOffers

      public void setCandidateFulfillmentGroupOffers(List<CandidateFulfillmentGroupOffer> candidateFulfillmentGroupOffers)
      List of candidate offers targeting fulfillment groups.
      Parameters:
      candidateFulfillmentGroupOffers - List of candidate offers targeting fulfillment groups.
      See Also:
    • setCandidateFulfillmentItemOffers

      public void setCandidateFulfillmentItemOffers(List<CandidateItemOffer> candidateFulfillmentItemOffers)
      List of candidate offers targeting fulfillment items.
      Parameters:
      candidateFulfillmentItemOffers - List of candidate offers targeting fulfillment items.
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object