All Known Implementing Classes:
DefaultOfferUserService

public interface OfferUserService
Helper methods around users for offers. Contains methods to determine if an offer has met max usage for a given order and context.
Author:
Chad Harchar (charchar)
  • Method Summary

    Modifier and Type
    Method
    Description
    buildUserTargetsForCustomerContext(com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext)
    Build and return a list of UserTargets based on the information provided in the CustomerContext.
    buildUserTargetsForOfferCustomerContext(Offer offer, com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    For the provided customer information, check if there are no more usages for the provided offer available.
  • Method Details

    • buildUserTargetsForCustomerContext

      @NonNull Set<UserTarget> buildUserTargetsForCustomerContext(@Nullable com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext)
      Build and return a list of UserTargets based on the information provided in the CustomerContext.
      Parameters:
      customerContext - The CustomerContext with which to build UserTargets
      Returns:
      a set of UserTargets
    • buildUserTargetsForOfferCustomerContext

      UserTarget buildUserTargetsForOfferCustomerContext(@NonNull Offer offer, @Nullable com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      For the provided customer information, check if there are no more usages for the provided offer available.
      Parameters:
      customerContext - context information for the customer
      offer - the offer that we are checking usage against
      contextInfo - context information around sandbox and multitenant state
      Returns:
      whether this offer has met it's max user usage for the given order and context info