Class DefaultReturnOperationService.ConfirmReturnHydrationResult
java.lang.Object
com.broadleafcommerce.orderoperation.service.DefaultReturnOperationService.ConfirmReturnHydrationResult
- Enclosing class:
- DefaultReturnOperationService
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 Summary
ConstructorsConstructorDescriptionConfirmReturnHydrationResult(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 Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanprotected intgetConfirmableQuantity(String itemId) Gets the quantity that are returned but not yet confirmed for the given item id.Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId().com.broadleafcommerce.order.client.domain.ReturnAuthorizationTheReturnAuthorizationtheconfirmReturnRequestbelongs to.protected ConfirmReturnItemRequestgetConfirmReturnItemRequest(String itemId) Gets theConfirmReturnItemRequestfor the given item id.Map ofConfirmReturnItemRequestbyOrderFulfillmentItem.getId().TheConfirmReturnRequestcontaining all theConfirmReturnItemRequestsList<com.broadleafcommerce.order.client.domain.OrderFulfillment>A list ofOrderFulfillmentsthat belong to theOrderMap ofOrderFulfillmentItembyOrderFulfillmentItem.getId().com.broadleafcommerce.order.client.domain.OrdergetOrder()TheOrderwhere the items being confirmed are from.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 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().voidsetConfirmRequestReturnAuth(com.broadleafcommerce.order.client.domain.ReturnAuthorization confirmRequestReturnAuth) TheReturnAuthorizationtheconfirmReturnRequestbelongs to.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().toString()
-
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
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
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
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
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
-
getConfirmReturnItemRequest
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
A map ofOrderItembyOrderItem.getId(). -
getFulfillments
A list ofOrderFulfillmentsthat belong to theOrder -
getConfirmReturnRequest
TheConfirmReturnRequestcontaining all theConfirmReturnItemRequests -
getConfirmRequestReturnAuth
public com.broadleafcommerce.order.client.domain.ReturnAuthorization getConfirmRequestReturnAuth()TheReturnAuthorizationtheconfirmReturnRequestbelongs to. -
getConfirmedQuantityByItemId
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId(). -
getReturnQuantityByItemId
Map of total quantities that are returned byOrderFulfillmentItem.getId().The items may or may not have been confirmed.
-
getConfirmReturnItemRequestByItemId
Map ofConfirmReturnItemRequestbyOrderFulfillmentItem.getId(). -
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
TheConfirmReturnRequestcontaining all theConfirmReturnItemRequests -
setConfirmRequestReturnAuth
public void setConfirmRequestReturnAuth(com.broadleafcommerce.order.client.domain.ReturnAuthorization confirmRequestReturnAuth) TheReturnAuthorizationtheconfirmReturnRequestbelongs to. -
setConfirmedQuantityByItemId
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId(). -
setReturnQuantityByItemId
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(). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-