java.lang.Object
com.broadleafcommerce.promotion.offer.service.engine.candidate.DefaultOfferUserService
All Implemented Interfaces:
OfferUserService

public class DefaultOfferUserService extends Object implements OfferUserService
Author:
Chad Harchar (charchar)
  • Field Details

  • Constructor Details

  • Method Details

    • buildUserTargetsForCustomerContext

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

      public UserTarget buildUserTargetsForOfferCustomerContext(@NonNull Offer offer, @Nullable com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: OfferUserService
      For the provided customer information, check if there are no more usages for the provided offer available.
      Specified by:
      buildUserTargetsForOfferCustomerContext in interface OfferUserService
      Parameters:
      offer - the offer that we are checking usage against
      customerContext - context information for the customer
      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
    • createUserTargetForOtherUserType

      protected UserTarget createUserTargetForOtherUserType(String userId, CustomerFields customerFields, String maxUsesPerUserStrategy)
    • getUserIdForOtherUserType

      protected String getUserIdForOtherUserType(@Nullable com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, String maxUsesPerUserStrategy)
    • createUserTarget

      protected UserTarget createUserTarget(String targetValue, String targetType)
    • getAuditService

      protected OfferAuditDetailService<? extends OfferAuditDetail> getAuditService()
    • getCustomerFields

      protected CustomerFields getCustomerFields()
    • getOfferFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getOfferFactory()
    • getOfferCodeService

      protected OfferCodeService<OfferCode> getOfferCodeService()
    • setOfferCodeService

      @Autowired public void setOfferCodeService(OfferCodeService<OfferCode> offerCodeService)