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

public class OfferCodeData extends Object
This class builds convenience structures that represent the code and related offer settings that are used by the offer engine processing. Specifically, it maintains a convenient mapping from client offer code representations, server offer code representations to the related offers and campaigns. It is intended to be used by the CandidateOffer to resolve properties that rely on a combination of request based and persisted properties.
  • Constructor Details

    • OfferCodeData

      public OfferCodeData()
  • Method Details

    • addOfferCodeDtos

      public void addOfferCodeDtos(List<com.broadleafcommerce.promotion.offer.client.web.context.OfferCodeDto> dtos)
    • addOfferCodes

      public void addOfferCodes(List<OfferCode> offerCodes)
    • getClientOfferCodeMap

      public Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OfferCodeDto> getClientOfferCodeMap()
      A map of offer codes to the dto passed in on the Order as part of the client request.
    • getServerOfferCodes

      public Map<String,Set<OfferCode>> getServerOfferCodes()
      A map of offer codes to the persisted OfferCode structures.
    • getCampaignIdOfferCodeMap

      public Map<String,Set<OfferCode>> getCampaignIdOfferCodeMap()
      A map of campaignId to offerCode
    • getOfferIdOfferCodeMap

      public Map<String,Set<OfferCode>> getOfferIdOfferCodeMap()
      A map of offerId to offerCode
    • setClientOfferCodeMap

      public void setClientOfferCodeMap(Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OfferCodeDto> clientOfferCodeMap)
      A map of offer codes to the dto passed in on the Order as part of the client request.
    • setServerOfferCodes

      public void setServerOfferCodes(Map<String,Set<OfferCode>> serverOfferCodes)
      A map of offer codes to the persisted OfferCode structures.
    • setCampaignIdOfferCodeMap

      public void setCampaignIdOfferCodeMap(Map<String,Set<OfferCode>> campaignIdOfferCodeMap)
      A map of campaignId to offerCode
    • setOfferIdOfferCodeMap

      public void setOfferIdOfferCodeMap(Map<String,Set<OfferCode>> offerIdOfferCodeMap)
      A map of offerId to offerCode