Class DefaultReturnableFulfillmentService

java.lang.Object
com.broadleafcommerce.order.service.DefaultReturnableFulfillmentService
All Implemented Interfaces:
ReturnableFulfillmentInfoService

public class DefaultReturnableFulfillmentService extends Object implements ReturnableFulfillmentInfoService
Default implementation of ReturnableFulfillmentInfoService.
Since:
Order Services 2.2.0, Release Train 2.3.0
Author:
Nathan Moore (nathandmoore)
  • Constructor Details

    • DefaultReturnableFulfillmentService

      public DefaultReturnableFulfillmentService(OrderService<com.broadleafcommerce.order.client.domain.Order> orderService, OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> orderFulfillmentService, OrderFulfillmentItemService<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> orderFulfillmentItemService, ReturnAuthorizationService<com.broadleafcommerce.order.client.domain.ReturnAuthorization> returnAuthorizationService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • getInfoForOrderFulfillment

      public ReturnableFulfillmentInfo getInfoForOrderFulfillment(String orderId, String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: ReturnableFulfillmentInfoService
      Produces a ReturnableFulfillmentInfo for the OrderFulfillment identified by fulfillmentId.
      Specified by:
      getInfoForOrderFulfillment in interface ReturnableFulfillmentInfoService
      Parameters:
      orderId - ID of the originating Order
      fulfillmentId - ID of the OrderFulfillment for which to determine returnable information
      contextInfo - Additional tracking context and other info
      Returns:
      A ReturnableFulfillmentInfo for the OrderFulfillment identified by fulfillmentId.
    • getOrderFulfillment

      protected com.broadleafcommerce.order.client.domain.OrderFulfillment getOrderFulfillment(String fulfillmentId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getInfoForOrder

      public ReturnableFulfillmentInfo getInfoForOrder(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: ReturnableFulfillmentInfoService
      Produces a ReturnableFulfillmentInfo for the Order identified by orderId.
      Specified by:
      getInfoForOrder in interface ReturnableFulfillmentInfoService
      Parameters:
      orderId - ID of the originating Order
      contextInfo - Additional tracking context and other info
      Returns:
      A ReturnableFulfillmentInfo for the OrderFulfillment identified by fulfillmentId.
    • getOrderFulfillments

      protected List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillments(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getExistingReturns

      protected List<com.broadleafcommerce.order.client.domain.ReturnAuthorization> getExistingReturns(String orderId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • findReturnableItems

      protected <I extends com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> List<I> findReturnableItems(Map<String,Integer> itemsAlreadyInReturn, Collection<I> items)
      Returns a list of OrderFulfillmentItems that can be returned with their quantities adjusted to the amount that can still be returned in the case of partial returns already existing.
      Parameters:
      itemsAlreadyInReturn - Returns a map of the IDs of items already included in a ReturnAuthorization along with the quantity being returned
      items - List of candidate items from an entire Order or a single OrderFulfillment
      Returns:
      Returns a list of OrderFulfillmentItems that can be returned with their quantities adjusted to the amount that can still be returned.
    • findRefundableFees

      protected <I extends com.broadleafcommerce.order.client.domain.IncludedFee> List<I> findRefundableFees(Map<String,Integer> feesAlreadyRefunded, Collection<I> fees)
    • getOrderService

      protected OrderService<com.broadleafcommerce.order.client.domain.Order> getOrderService()
    • getOrderFulfillmentService

      protected OrderFulfillmentService<com.broadleafcommerce.order.client.domain.OrderFulfillment> getOrderFulfillmentService()
    • getOrderFulfillmentItemService

      protected OrderFulfillmentItemService<com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> getOrderFulfillmentItemService()
    • getReturnAuthorizationService

      protected ReturnAuthorizationService<com.broadleafcommerce.order.client.domain.ReturnAuthorization> getReturnAuthorizationService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()