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 byReturnOperationServiceto 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 Summary
Constructors Constructor Description 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, Map<String,Integer> confirmedQuantityByItemId, Map<String,Integer> returnQuantityByItemId, Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId, Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)protected intgetConfirmableQuantity(String itemId)Gets the quantity that are returned but not yet confirmed for the given item id.Map<String,Integer>getConfirmedQuantityByItemId()Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId().protected ConfirmReturnItemRequestgetConfirmReturnItemRequest(String itemId)Gets theConfirmReturnItemRequestfor the given item id.Map<String,ConfirmReturnItemRequest>getConfirmReturnItemRequestByItemId()Map ofConfirmReturnItemRequestbyOrderFulfillmentItem.getId().ConfirmReturnRequestgetConfirmReturnRequest()TheConfirmReturnRequestcontaining all theConfirmReturnItemRequestsList<com.broadleafcommerce.order.client.domain.OrderFulfillment>getFulfillments()a list ofOrderFulfillmentsthat belong to theOrderMap<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem>getItemById()Map ofOrderFulfillmentItembyOrderFulfillmentItem.getId().com.broadleafcommerce.order.client.domain.OrdergetOrder()TheOrderwhere the items being confirmed are from.Map<String,com.broadleafcommerce.order.client.domain.OrderItem>getOrderItemById()A map ofOrderItembyOrderItem.getId().protected intgetQuantityConfirmed(String itemId)Gets the quantity in which the returns are already confirmed for the given item id.protected intgetQuantityReturned(String itemId)Gets the quantity that are returned for the given item id.Map<String,Integer>getReturnQuantityByItemId()Map of total quantities that are returned byOrderFulfillmentItem.getId().protected booleanhasConfirmReturnItemRequest(String itemId)Determines if there's anyConfirmReturnItemRequestsfor the given item id.inthashCode()protected booleanisItemBeingConfirmed(String itemId)voidsetConfirmedQuantityByItemId(Map<String,Integer> confirmedQuantityByItemId)Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId().voidsetConfirmReturnItemRequestByItemId(Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId)Map ofConfirmReturnItemRequestbyOrderFulfillmentItem.getId().voidsetConfirmReturnRequest(ConfirmReturnRequest confirmReturnRequest)TheConfirmReturnRequestcontaining all theConfirmReturnItemRequestsvoidsetFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)a list ofOrderFulfillmentsthat belong to theOrdervoidsetItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)Map ofOrderFulfillmentItembyOrderFulfillmentItem.getId().voidsetOrder(com.broadleafcommerce.order.client.domain.Order order)TheOrderwhere the items being confirmed are from.voidsetOrderItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderItem> orderItemById)A map ofOrderItembyOrderItem.getId().voidsetReturnQuantityByItemId(Map<String,Integer> returnQuantityByItemId)Map of total quantities that are returned byOrderFulfillmentItem.getId().StringtoString()
-
-
-
Constructor Detail
-
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, Map<String,Integer> confirmedQuantityByItemId, Map<String,Integer> returnQuantityByItemId, Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId, Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
-
-
Method Detail
-
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 anyConfirmReturnItemRequestsfor the given item id.- Parameters:
itemId- fulfillment item id to check if there's anyConfirmReturnItemRequestsfor- Returns:
- true if there is a
ConfirmReturnItemRequestfor the given item id
-
isItemBeingConfirmed
protected boolean isItemBeingConfirmed(String itemId)
-
getConfirmReturnItemRequest
protected ConfirmReturnItemRequest getConfirmReturnItemRequest(String itemId)
Gets theConfirmReturnItemRequestfor the given item id.- Parameters:
itemId- fulfillment item id to get theConfirmReturnItemRequestfor- Returns:
- the
ConfirmReturnItemRequestfor the given item id
-
getOrder
public com.broadleafcommerce.order.client.domain.Order getOrder()
TheOrderwhere the items being confirmed are from.
-
getOrderItemById
public Map<String,com.broadleafcommerce.order.client.domain.OrderItem> getOrderItemById()
A map ofOrderItembyOrderItem.getId().
-
getFulfillments
public List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillments()
a list ofOrderFulfillmentsthat belong to theOrder
-
getConfirmReturnRequest
public ConfirmReturnRequest getConfirmReturnRequest()
TheConfirmReturnRequestcontaining all theConfirmReturnItemRequests
-
getConfirmedQuantityByItemId
public Map<String,Integer> getConfirmedQuantityByItemId()
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId().
-
getReturnQuantityByItemId
public Map<String,Integer> getReturnQuantityByItemId()
Map of total quantities that are returned byOrderFulfillmentItem.getId().The items may or may not have been confirmed.
-
getConfirmReturnItemRequestByItemId
public Map<String,ConfirmReturnItemRequest> getConfirmReturnItemRequestByItemId()
Map ofConfirmReturnItemRequestbyOrderFulfillmentItem.getId().
-
getItemById
public Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> getItemById()
Map ofOrderFulfillmentItembyOrderFulfillmentItem.getId().
-
setOrder
public void setOrder(com.broadleafcommerce.order.client.domain.Order order)
TheOrderwhere the items being confirmed are from.
-
setOrderItemById
public void setOrderItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderItem> orderItemById)
A map ofOrderItembyOrderItem.getId().
-
setFulfillments
public void setFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
a list ofOrderFulfillmentsthat belong to theOrder
-
setConfirmReturnRequest
public void setConfirmReturnRequest(ConfirmReturnRequest confirmReturnRequest)
TheConfirmReturnRequestcontaining all theConfirmReturnItemRequests
-
setConfirmedQuantityByItemId
public void setConfirmedQuantityByItemId(Map<String,Integer> confirmedQuantityByItemId)
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId().
-
setReturnQuantityByItemId
public void setReturnQuantityByItemId(Map<String,Integer> returnQuantityByItemId)
Map of total quantities that are returned byOrderFulfillmentItem.getId().The items may or may not have been confirmed.
-
setConfirmReturnItemRequestByItemId
public void setConfirmReturnItemRequestByItemId(Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId)
Map ofConfirmReturnItemRequestbyOrderFulfillmentItem.getId().
-
setItemById
public void setItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
Map ofOrderFulfillmentItembyOrderFulfillmentItem.getId().
-
canEqual
protected boolean canEqual(Object other)
-
-