Class DefaultReturnOperationService.ConfirmReturnHydrationResult

java.lang.Object
com.broadleafcommerce.orderoperation.service.DefaultReturnOperationService.ConfirmReturnHydrationResult
Enclosing class:
DefaultReturnOperationService

public static class DefaultReturnOperationService.ConfirmReturnHydrationResult extends Object
An intermediary data structure used internally by ReturnOperationService to hold all the relevant data regarding confirms and existing returns, to prevent processing the data multiple times and make it easier to pass the data between methods.
  • Constructor Details

    • ConfirmReturnHydrationResult

      public ConfirmReturnHydrationResult()
    • ConfirmReturnHydrationResult

      public ConfirmReturnHydrationResult(com.broadleafcommerce.order.client.domain.Order order, Map<String,com.broadleafcommerce.order.client.domain.OrderItem> orderItemById, List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments, ConfirmReturnRequest confirmReturnRequest, com.broadleafcommerce.order.client.domain.ReturnAuthorization confirmRequestReturnAuth, Map<String,Integer> confirmedQuantityByItemId, Map<String,Integer> returnQuantityByItemId, Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId, Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
  • Method Details

    • getQuantityConfirmed

      protected int getQuantityConfirmed(String itemId)
      Gets the quantity in which the returns are already confirmed for the given item id.
      Parameters:
      itemId - fulfillment item id to get the confirmed quantity for
      Returns:
      the quantity in which the returns are already confirmed by the given item id
    • getQuantityReturned

      protected int getQuantityReturned(String itemId)
      Gets the quantity that are returned for the given item id.
      Parameters:
      itemId - fulfillment item id to get the return quantity for
      Returns:
      the quantity that are returned for the given item id
    • getConfirmableQuantity

      protected int getConfirmableQuantity(String itemId)
      Gets the quantity that are returned but not yet confirmed for the given item id.
      Parameters:
      itemId - fulfillment item id to get the confirmable quantity for
      Returns:
      the quantity that are returned but not yet confirmed for the given item id
    • hasConfirmReturnItemRequest

      protected boolean hasConfirmReturnItemRequest(String itemId)
      Determines if there's any ConfirmReturnItemRequests for the given item id.
      Parameters:
      itemId - fulfillment item id to check if there's any ConfirmReturnItemRequests for
      Returns:
      true if there is a ConfirmReturnItemRequest for the given item id
    • isItemBeingConfirmed

      protected boolean isItemBeingConfirmed(String itemId)
    • getConfirmReturnItemRequest

      protected ConfirmReturnItemRequest getConfirmReturnItemRequest(String itemId)
      Gets the ConfirmReturnItemRequest for the given item id.
      Parameters:
      itemId - fulfillment item id to get the ConfirmReturnItemRequest for
      Returns:
      the ConfirmReturnItemRequest for the given item id
    • getOrder

      public com.broadleafcommerce.order.client.domain.Order getOrder()
      The Order where the items being confirmed are from.
    • getOrderItemById

      public Map<String,com.broadleafcommerce.order.client.domain.OrderItem> getOrderItemById()
      A map of OrderItem by OrderItem.getId().
    • getFulfillments

      public List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillments()
      A list of OrderFulfillments that belong to the Order
    • getConfirmReturnRequest

      public ConfirmReturnRequest getConfirmReturnRequest()
    • getConfirmRequestReturnAuth

      public com.broadleafcommerce.order.client.domain.ReturnAuthorization getConfirmRequestReturnAuth()
      The ReturnAuthorization the confirmReturnRequest belongs to.
    • getConfirmedQuantityByItemId

      public Map<String,Integer> getConfirmedQuantityByItemId()
      Map of total quantities in which the returns are already confirmed by OrderFulfillmentItem.getId().
    • getReturnQuantityByItemId

      public Map<String,Integer> getReturnQuantityByItemId()
      Map of total quantities that are returned by OrderFulfillmentItem.getId().

      The items may or may not have been confirmed.

    • getConfirmReturnItemRequestByItemId

      public Map<String,ConfirmReturnItemRequest> getConfirmReturnItemRequestByItemId()
      Map of ConfirmReturnItemRequest by OrderFulfillmentItem.getId().
    • getItemById

      public Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> getItemById()
      Map of OrderFulfillmentItem by OrderFulfillmentItem.getId().
    • setOrder

      public void setOrder(com.broadleafcommerce.order.client.domain.Order order)
      The Order where the items being confirmed are from.
    • setOrderItemById

      public void setOrderItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderItem> orderItemById)
      A map of OrderItem by OrderItem.getId().
    • setFulfillments

      public void setFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
      A list of OrderFulfillments that belong to the Order
    • setConfirmReturnRequest

      public void setConfirmReturnRequest(ConfirmReturnRequest confirmReturnRequest)
    • setConfirmRequestReturnAuth

      public void setConfirmRequestReturnAuth(com.broadleafcommerce.order.client.domain.ReturnAuthorization confirmRequestReturnAuth)
      The ReturnAuthorization the confirmReturnRequest belongs to.
    • setConfirmedQuantityByItemId

      public void setConfirmedQuantityByItemId(Map<String,Integer> confirmedQuantityByItemId)
      Map of total quantities in which the returns are already confirmed by OrderFulfillmentItem.getId().
    • setReturnQuantityByItemId

      public void setReturnQuantityByItemId(Map<String,Integer> returnQuantityByItemId)
      Map of total quantities that are returned by OrderFulfillmentItem.getId().

      The items may or may not have been confirmed.

    • setConfirmReturnItemRequestByItemId

      public void setConfirmReturnItemRequestByItemId(Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId)
      Map of ConfirmReturnItemRequest by OrderFulfillmentItem.getId().
    • setItemById

      public void setItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
      Map of OrderFulfillmentItem by OrderFulfillmentItem.getId().
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object