Class DefaultItemMarketingMessageResolver<P extends MarketingMessage,​O extends Offer>

    • Method Detail

      • findAllMessagesForItemAsQualifierOrTarget

        protected List<P> findAllMessagesForItemAsQualifierOrTarget​(ItemMarketingMessageRequest request,
                                                                    Stream<O> candidateOffers,
                                                                    @Nullable
                                                                    com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Deprecated.
        Find all marketing messages from offers where the line item is used either as the target of the offer, or used to qualify for the offer.
        Parameters:
        request - an ItemMarketingMessageRequest containing the parameters by which the results will be filtered
        candidateOffers - the candidate offers to filter on
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        the list of marketing messages that qualify based on the associated offers and message type.
      • isItemOffer

        protected boolean isItemOffer​(Offer offer)
        Deprecated.
        Checks if the Offer targets an order or fulfillment group item.
        Parameters:
        offer - the Offer to check
        Returns:
        true if the offer targets an order or fulfillment group item
      • isItemQualifier

        protected boolean isItemQualifier​(Offer offer,
                                          ItemMarketingMessageRequest request)
        Deprecated.
        Checks if any of the rules in Offer.getItemQualifierCriteria() matches the line item on this request in order to determine if the line item can be used to qualify for the offer.
        Parameters:
        offer - the Offer to check
        request - an ItemMarketingMessageRequest containing the parameters by which the results will be filtered
        Returns:
        true if a match is found in the qualifier criteria
      • isItemTarget

        protected boolean isItemTarget​(Offer offer,
                                       ItemMarketingMessageRequest request)
        Deprecated.
        If this is an item offer, checks if any of the rules in Offer.getTargetItemCriteria() matches the line item on this request in order to determine if the line item can be used as the target for the offer. If the offer discount cannot apply to the sales price and the line item is on sale, then the item will not qualify as the offer target.
        Parameters:
        offer - the Offer to check
        request - an ItemMarketingMessageRequest containing the parameters by which the results will be filtered
        Returns:
        true if the line item can qualify as the target of the offer