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
ConstructorDescriptionConfirmReturnHydrationResult
(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 boolean
boolean
protected int
getConfirmableQuantity
(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.ReturnAuthorization
TheReturnAuthorization
theconfirmReturnRequest
belongs to.protected ConfirmReturnItemRequest
getConfirmReturnItemRequest
(String itemId) Gets theConfirmReturnItemRequest
for the given item id.Map ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
.TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
A list ofOrderFulfillments
that belong to theOrder
Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
.com.broadleafcommerce.order.client.domain.Order
getOrder()
TheOrder
where the items being confirmed are from.A map ofOrderItem
byOrderItem.getId()
.protected int
getQuantityConfirmed
(String itemId) Gets the quantity in which the returns are already confirmed for the given item id.protected int
getQuantityReturned
(String itemId) Gets the quantity that are returned for the given item id.Map of total quantities that are returned byOrderFulfillmentItem.getId()
.protected boolean
hasConfirmReturnItemRequest
(String itemId) Determines if there's anyConfirmReturnItemRequests
for the given item id.int
hashCode()
protected boolean
isItemBeingConfirmed
(String itemId) void
setConfirmedQuantityByItemId
(Map<String, Integer> confirmedQuantityByItemId) Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId()
.void
setConfirmRequestReturnAuth
(com.broadleafcommerce.order.client.domain.ReturnAuthorization confirmRequestReturnAuth) TheReturnAuthorization
theconfirmReturnRequest
belongs to.void
setConfirmReturnItemRequestByItemId
(Map<String, ConfirmReturnItemRequest> confirmReturnItemRequestByItemId) Map ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
.void
setConfirmReturnRequest
(ConfirmReturnRequest confirmReturnRequest) TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
void
setFulfillments
(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments) A list ofOrderFulfillments
that belong to theOrder
void
setItemById
(Map<String, com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById) Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
.void
setOrder
(com.broadleafcommerce.order.client.domain.Order order) TheOrder
where the items being confirmed are from.void
setOrderItemById
(Map<String, com.broadleafcommerce.order.client.domain.OrderItem> orderItemById) A map ofOrderItem
byOrderItem.getId()
.void
setReturnQuantityByItemId
(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 anyConfirmReturnItemRequests
for the given item id.- Parameters:
itemId
- fulfillment item id to check if there's anyConfirmReturnItemRequests
for- Returns:
- true if there is a
ConfirmReturnItemRequest
for the given item id
-
isItemBeingConfirmed
-
getConfirmReturnItemRequest
Gets theConfirmReturnItemRequest
for the given item id.- Parameters:
itemId
- fulfillment item id to get theConfirmReturnItemRequest
for- Returns:
- the
ConfirmReturnItemRequest
for the given item id
-
getOrder
public com.broadleafcommerce.order.client.domain.Order getOrder()TheOrder
where the items being confirmed are from. -
getOrderItemById
A map ofOrderItem
byOrderItem.getId()
. -
getFulfillments
A list ofOrderFulfillments
that belong to theOrder
-
getConfirmReturnRequest
TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
-
getConfirmRequestReturnAuth
public com.broadleafcommerce.order.client.domain.ReturnAuthorization getConfirmRequestReturnAuth()TheReturnAuthorization
theconfirmReturnRequest
belongs 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 ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
. -
getItemById
Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
. -
setOrder
public void setOrder(com.broadleafcommerce.order.client.domain.Order order) TheOrder
where the items being confirmed are from. -
setOrderItemById
public void setOrderItemById(Map<String, com.broadleafcommerce.order.client.domain.OrderItem> orderItemById) A map ofOrderItem
byOrderItem.getId()
. -
setFulfillments
public void setFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments) A list ofOrderFulfillments
that belong to theOrder
-
setConfirmReturnRequest
TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
-
setConfirmRequestReturnAuth
public void setConfirmRequestReturnAuth(com.broadleafcommerce.order.client.domain.ReturnAuthorization confirmRequestReturnAuth) TheReturnAuthorization
theconfirmReturnRequest
belongs 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 ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
. -
setItemById
public void setItemById(Map<String, com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById) Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-