Class CustomerSegmentOfferServiceExtensionHandler
java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.core.offer.service.AbstractOfferServiceExtensionHandler
com.broadleafcommerce.customersegment.extension.CustomerSegmentOfferServiceExtensionHandler
- All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler,org.broadleafcommerce.core.offer.service.OfferServiceExtensionHandler
@Service("blCustomerSegmentOfferServiceExtensionHandler")
public class CustomerSegmentOfferServiceExtensionHandler
extends org.broadleafcommerce.core.offer.service.AbstractOfferServiceExtensionHandler
This extension of the OfferService allows the system to filter offers based on the Customer Segment.
- Author:
- Chris Kittrell
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CustomerSegmentServiceprotected org.broadleafcommerce.core.offer.service.OfferServiceExtensionManagerFields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.broadleafcommerce.common.extension.ExtensionResultStatusTypeapplyAdditionalFilters(List<org.broadleafcommerce.core.offer.domain.Offer> offers, org.broadleafcommerce.core.order.domain.Order order) Filter out offers that do not match the customerSegment rule or customer set (if applicable).voidinit()protected booleanisCustomerInCustomerSegments(List<OfferCustomerSegmentXref> customerSegments, org.broadleafcommerce.profile.core.domain.Customer customer) Methods inherited from class org.broadleafcommerce.core.offer.service.AbstractOfferServiceExtensionHandler
addAdditionalOffersForCode, applyAdditionalRuleVariablesForItemOfferEvaluation, applyItemOffer, buildOfferCodeListForCustomer, calculatePotentialSavings, chooseSaleOrRetailAdjustments, createOrderItemPriceDetailAdjustment, removeOfferCodeFromOrder, resetPriceDetails, synchronizeAdjustmentsAndPricesMethods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
getPriority, isEnabled, setEnabled, setPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler
getPriority, isEnabled
-
Field Details
-
extensionManager
protected org.broadleafcommerce.core.offer.service.OfferServiceExtensionManager extensionManager -
customerSegmentService
-
-
Constructor Details
-
CustomerSegmentOfferServiceExtensionHandler
public CustomerSegmentOfferServiceExtensionHandler()
-
-
Method Details
-
init
@PostConstruct public void init() -
applyAdditionalFilters
public org.broadleafcommerce.common.extension.ExtensionResultStatusType applyAdditionalFilters(List<org.broadleafcommerce.core.offer.domain.Offer> offers, org.broadleafcommerce.core.order.domain.Order order) Filter out offers that do not match the customerSegment rule or customer set (if applicable).- Specified by:
applyAdditionalFiltersin interfaceorg.broadleafcommerce.core.offer.service.OfferServiceExtensionHandler- Overrides:
applyAdditionalFiltersin classorg.broadleafcommerce.core.offer.service.AbstractOfferServiceExtensionHandler
-
isCustomerInCustomerSegments
protected boolean isCustomerInCustomerSegments(List<OfferCustomerSegmentXref> customerSegments, org.broadleafcommerce.profile.core.domain.Customer customer)
-