Class AbstractOrderServiceExtensionHandler
java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.core.order.service.AbstractOrderServiceExtensionHandler
- All Implemented Interfaces:
ExtensionHandler,OrderServiceExtensionHandler
- Direct Known Subclasses:
CartMessageOrderItemServiceExtensionHandler
public abstract class AbstractOrderServiceExtensionHandler
extends AbstractExtensionHandler
implements OrderServiceExtensionHandler
- Author:
- bpolster
-
Field Summary
Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler
enabled, priority -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOfferCodes(Order order, List<OfferCode> offerCodes, boolean priceOrder) attachAdditionalDataToNewNamedCart(Customer customer, Order cart) attachAdditionalDataToOrder(Order order, boolean priceOrder) Can be used to attach or update fields must prior to saving an order.findCartForCustomerWithEnhancements(Customer customer, ExtensionResultHolder erh) Retrieve an enhanced version of the cart for the customer.findCartForCustomerWithEnhancements(Customer customer, Order candidateCart, ExtensionResultHolder erh) Retrieve an enhanced version of the cart for the customer.preValidateCartOperation(Order cart, ExtensionResultHolder erh) Methods 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
-
Constructor Details
-
AbstractOrderServiceExtensionHandler
public AbstractOrderServiceExtensionHandler()
-
-
Method Details
-
attachAdditionalDataToNewNamedCart
- Specified by:
attachAdditionalDataToNewNamedCartin interfaceOrderServiceExtensionHandler
-
preValidateCartOperation
- Specified by:
preValidateCartOperationin interfaceOrderServiceExtensionHandler
-
preValidateUpdateQuantityOperation
public ExtensionResultStatusType preValidateUpdateQuantityOperation(Order cart, OrderItemRequestDTO dto, ExtensionResultHolder erh) - Specified by:
preValidateUpdateQuantityOperationin interfaceOrderServiceExtensionHandler
-
attachAdditionalDataToOrder
Description copied from interface:OrderServiceExtensionHandlerCan be used to attach or update fields must prior to saving an order.- Specified by:
attachAdditionalDataToOrderin interfaceOrderServiceExtensionHandler- Returns:
-
addOfferCodes
public ExtensionResultStatusType addOfferCodes(Order order, List<OfferCode> offerCodes, boolean priceOrder) - Specified by:
addOfferCodesin interfaceOrderServiceExtensionHandler
-
findCartForCustomerWithEnhancements
public ExtensionResultStatusType findCartForCustomerWithEnhancements(Customer customer, ExtensionResultHolder erh) Description copied from interface:OrderServiceExtensionHandlerRetrieve an enhanced version of the cart for the customer. Individual instances ofOrderServiceExtensionHandlercan provide one or more interesting enhancements.- Specified by:
findCartForCustomerWithEnhancementsin interfaceOrderServiceExtensionHandler- Parameters:
customer- the user for whom the cart is retrievederh- the holder for the enhanced cart to be set by the handler- Returns:
- whether or not the enhancement was performed
-
findCartForCustomerWithEnhancements
public ExtensionResultStatusType findCartForCustomerWithEnhancements(Customer customer, Order candidateCart, ExtensionResultHolder erh) Description copied from interface:OrderServiceExtensionHandlerRetrieve an enhanced version of the cart for the customer. Use the candidateCart as the source cart to be enhanced. Individual instances ofOrderServiceExtensionHandlercan provide one or more interesting enhancements.- Specified by:
findCartForCustomerWithEnhancementsin interfaceOrderServiceExtensionHandler- Parameters:
customer- the user for whom the cart is enhancedcandidateCart- the source cart to enhanceerh- the holder for the enhanced cart to be set by the handler- Returns:
- whether or not the enhancement was performed
-