Class AbstractOrderServiceExtensionHandler

java.lang.Object
org.broadleafcommerce.common.extension.AbstractExtensionHandler
org.broadleafcommerce.core.order.service.AbstractOrderServiceExtensionHandler
All Implemented Interfaces:
org.broadleafcommerce.common.extension.ExtensionHandler, OrderServiceExtensionHandler
Direct Known Subclasses:
CartMessageOrderItemServiceExtensionHandler

public abstract class AbstractOrderServiceExtensionHandler extends org.broadleafcommerce.common.extension.AbstractExtensionHandler implements OrderServiceExtensionHandler
Author:
bpolster
  • Field Summary

    Fields inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler

    enabled, priority
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    addOfferCodes(Order order, List<OfferCode> offerCodes, boolean priceOrder)
     
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    attachAdditionalDataToNewNamedCart(org.broadleafcommerce.profile.core.domain.Customer customer, Order cart)
     
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    attachAdditionalDataToOrder(Order order, boolean priceOrder)
    Can be used to attach or update fields must prior to saving an order.
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    findCartForCustomerWithEnhancements(org.broadleafcommerce.profile.core.domain.Customer customer, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
    Retrieve an enhanced version of the cart for the customer.
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    findCartForCustomerWithEnhancements(org.broadleafcommerce.profile.core.domain.Customer customer, Order candidateCart, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
    Retrieve an enhanced version of the cart for the customer.
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    preValidateCartOperation(Order cart, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
     
    org.broadleafcommerce.common.extension.ExtensionResultStatusType
    preValidateUpdateQuantityOperation(Order cart, OrderItemRequestDTO dto, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
     

    Methods inherited from class org.broadleafcommerce.common.extension.AbstractExtensionHandler

    getPriority, isEnabled, setEnabled, setPriority

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.broadleafcommerce.common.extension.ExtensionHandler

    getPriority, isEnabled
  • Constructor Details

    • AbstractOrderServiceExtensionHandler

      public AbstractOrderServiceExtensionHandler()
  • Method Details

    • attachAdditionalDataToNewNamedCart

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType attachAdditionalDataToNewNamedCart(org.broadleafcommerce.profile.core.domain.Customer customer, Order cart)
      Specified by:
      attachAdditionalDataToNewNamedCart in interface OrderServiceExtensionHandler
    • preValidateCartOperation

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType preValidateCartOperation(Order cart, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
      Specified by:
      preValidateCartOperation in interface OrderServiceExtensionHandler
    • preValidateUpdateQuantityOperation

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType preValidateUpdateQuantityOperation(Order cart, OrderItemRequestDTO dto, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
      Specified by:
      preValidateUpdateQuantityOperation in interface OrderServiceExtensionHandler
    • attachAdditionalDataToOrder

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType attachAdditionalDataToOrder(Order order, boolean priceOrder)
      Description copied from interface: OrderServiceExtensionHandler
      Can be used to attach or update fields must prior to saving an order.
      Specified by:
      attachAdditionalDataToOrder in interface OrderServiceExtensionHandler
      Returns:
    • addOfferCodes

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType addOfferCodes(Order order, List<OfferCode> offerCodes, boolean priceOrder)
      Specified by:
      addOfferCodes in interface OrderServiceExtensionHandler
    • findCartForCustomerWithEnhancements

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType findCartForCustomerWithEnhancements(org.broadleafcommerce.profile.core.domain.Customer customer, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
      Description copied from interface: OrderServiceExtensionHandler
      Retrieve an enhanced version of the cart for the customer. Individual instances of OrderServiceExtensionHandler can provide one or more interesting enhancements.
      Specified by:
      findCartForCustomerWithEnhancements in interface OrderServiceExtensionHandler
      Parameters:
      customer - the user for whom the cart is retrieved
      erh - the holder for the enhanced cart to be set by the handler
      Returns:
      whether or not the enhancement was performed
    • findCartForCustomerWithEnhancements

      public org.broadleafcommerce.common.extension.ExtensionResultStatusType findCartForCustomerWithEnhancements(org.broadleafcommerce.profile.core.domain.Customer customer, Order candidateCart, org.broadleafcommerce.common.extension.ExtensionResultHolder erh)
      Description copied from interface: OrderServiceExtensionHandler
      Retrieve an enhanced version of the cart for the customer. Use the candidateCart as the source cart to be enhanced. Individual instances of OrderServiceExtensionHandler can provide one or more interesting enhancements.
      Specified by:
      findCartForCustomerWithEnhancements in interface OrderServiceExtensionHandler
      Parameters:
      customer - the user for whom the cart is enhanced
      candidateCart - the source cart to enhance
      erh - the holder for the enhanced cart to be set by the handler
      Returns:
      whether or not the enhancement was performed