Package org.apache.ofbiz.order.order
Class OrderServices
java.lang.Object
org.apache.ofbiz.order.order.OrderServices
Order Processing Services
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddItemToApprovedOrder
(DispatchContext dctx, Map<String, ? extends Object> context) addOrderItemShipGroup
(DispatchContext dctx, Map<String, Object> context) Create an OrderItemShipGroup recordaddOrderItemShipGroupAssoc
(DispatchContext dctx, Map<String, Object> context) Create orderItem and shipGroup associationaddRoleType
(DispatchContext ctx, Map<String, ? extends Object> context) Service to add a role type to an orderallowOrderSplit
(DispatchContext ctx, Map<String, ? extends Object> context) approveAllocationPlanItems
(DispatchContext dctx, Map<String, ? extends Object> context) associateOrderWithAllocationPlans
(DispatchContext dctx, Map<String, ? extends Object> context) callProcessOrderPayments
(DispatchContext dctx, Map<String, ? extends Object> context) cancelAllocationPlanItemByOrderItem
(DispatchContext dctx, Map<String, ? extends Object> context) cancelAllocationPlanItems
(DispatchContext dctx, Map<String, ? extends Object> context) cancelFlaggedSalesOrders
(DispatchContext dctx, Map<String, ? extends Object> context) cancelOrderItem
(DispatchContext ctx, Map<String, ? extends Object> context) Service to cancel an order item quantitycancelRemainingPurchaseOrderItems
(DispatchContext dctx, Map<String, ? extends Object> context) Cancels remaining (unreceived) quantities for items of an order.changeAllocationPlanItemStatus
(DispatchContext dctx, Map<String, ? extends Object> context) changeAllocationPlanStatus
(DispatchContext dctx, Map<String, ? extends Object> context) checkCreateDropShipPurchaseOrders
(DispatchContext ctx, Map<String, ? extends Object> context) checkDigitalItemFulfillment
(DispatchContext dctx, Map<String, ? extends Object> context) checkItemStatus
(DispatchContext ctx, Map<String, ? extends Object> context) Service for checking to see if an order is fully completed or canceledcompleteAllocationPlanItemByOrderItem
(DispatchContext dctx, Map<String, ? extends Object> context) countProductQuantityOrdered
(DispatchContext ctx, Map<String, Object> context) createAllocationPlanAndItems
(DispatchContext dctx, Map<String, ? extends Object> context) createAlsoBoughtProductAssocs
(DispatchContext dctx, Map<String, ? extends Object> context) createAlsoBoughtProductAssocsForOrder
(DispatchContext dctx, Map<String, ? extends Object> context) createOrder
(DispatchContext ctx, Map<String, ? extends Object> context) Service for creating a new ordercreateOrderFromShoppingCart
(DispatchContext dctx, Map<String, ? extends Object> context) createOrderNote
(DispatchContext dctx, Map<String, ? extends Object> context) Service to create a order header note.createPaymentFromPreference
(DispatchContext dctx, Map<String, ? extends Object> context) Service to create a payment using an order payment preference.createSimpleNonProductSalesOrder
(DispatchContext dctx, Map<String, ? extends Object> context) deleteOrderItemShipGroup
(DispatchContext ctx, Map<?, ?> context) Remove an OrderItemShipGroup recordstatic String
determineSingleFacilityFromOrder
(GenericValue orderHeader) fulfillDigitalItems
(DispatchContext ctx, Map<String, ? extends Object> context) generateReqsFromCancelledPOItems
(DispatchContext dctx, Map<String, ? extends Object> context) Generates a product requirement for the total cancelled quantity over all order items for each productgetOrderAddress
(DispatchContext dctx, Map<String, ? extends Object> context) Service to get an order contact mech.getOrderHeaderInformation
(DispatchContext dctx, Map<String, ? extends Object> context) Service to get order header information as standard results.getOrderItemInvoicedAmountAndQuantity
(DispatchContext dctx, Map<String, ? extends Object> context) Determines the total amount invoiced for a given order item over all invoices by totalling the item subtotal (via OrderItemBilling), any adjustments for that item (via OrderAdjustmentBilling), and the item's share of any order-level adjustments (that calculated by applying the percentage of the items total that the item represents to the order-level adjustments total (also via OrderAdjustmentBilling).getOrderShippingAmount
(DispatchContext dctx, Map<String, ? extends Object> context) Service to get the total shipping for an order.static String
getProductName
(GenericValue product, String orderItemName) static String
getProductName
(GenericValue product, GenericValue orderItem) invoiceServiceItems
(DispatchContext dctx, Map<String, ? extends Object> context) Service to invoice service items from orderisInventoryAllocationRequired
(DispatchContext dctx, Map<String, ? extends Object> context) loadCartForUpdate
(DispatchContext dctx, Map<String, ? extends Object> context) massCancelOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massCancelRemainingPurchaseOrderItems
(DispatchContext dctx, Map<String, ? extends Object> context) massChangeApproved
(DispatchContext dctx, Map<String, ? extends Object> context) massChangeItemStatus
(DispatchContext dctx, Map<String, ? extends Object> context, String statusId) massChangeOrderStatus
(DispatchContext dctx, Map<String, ? extends Object> context, String statusId) massCreateFileForOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massHoldOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massPickOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massPrintOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massProcessOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massQuickShipOrders
(DispatchContext dctx, Map<String, ? extends Object> context) massRejectOrders
(DispatchContext dctx, Map<String, ? extends Object> context) processOrderPayments
(DispatchContext dctx, Map<String, ? extends Object> context) recalcOrderShipping
(DispatchContext ctx, Map<String, ? extends Object> context) Service for checking and re-calc the shipping amountrecalcOrderTax
(DispatchContext ctx, Map<String, ? extends Object> context) Service for checking and re-calc the tax amountremoveRoleType
(DispatchContext ctx, Map<String, ? extends Object> context) Service to remove a role type from an orderstatic void
reserveInventory
(Delegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, Locale locale, List<GenericValue> orderItemShipGroupInfo, List<String> dropShipGroupIds, Map<String, GenericValue> itemValuesBySeqId, String orderTypeId, String productStoreId, List<String> resErrorMessages) resetGrandTotal
(DispatchContext ctx, Map<String, ? extends Object> context) Service for resetting the OrderHeader grandTotalrunSubscriptionAutoReorders
(DispatchContext dctx, Map<String, ? extends Object> context) saveUpdatedCartToOrder
(DispatchContext dctx, Map<String, ? extends Object> context) sendOrderBackorderNotification
(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order changessendOrderChangeNotification
(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order changessendOrderCompleteNotification
(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order changessendOrderConfirmNotification
(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with initial order confirmationsendOrderNotificationScreen
(DispatchContext dctx, Map<String, ? extends Object> context, String emailType) sendOrderPayRetryNotification
(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order payment retry resultssendPOEmail
(DispatchContext dctx, Map<String, ? extends Object> context) sendProcessNotification
(DispatchContext ctx, Map<String, ? extends Object> context) Service to email order notifications for pending actionssetEmptyGrandTotals
(DispatchContext ctx, Map<String, ? extends Object> context) Service for setting the OrderHeader grandTotal for all OrderHeaders with no grandTotalsetGiftMessage
(DispatchContext dctx, Map<String, ? extends Object> context) setItemStatus
(DispatchContext ctx, Map<String, ? extends Object> context) Service for changing the status on order item(s)setOrderPaymentStatus
(DispatchContext ctx, Map<String, ? extends Object> context) setOrderStatus
(DispatchContext ctx, Map<String, ? extends Object> context) Service for changing the status on an order headersetShippingInstructions
(DispatchContext dctx, Map<String, ? extends Object> context) shoppingCartRemoteTest
(DispatchContext dctx, Map<String, ? extends Object> context) shoppingCartTest
(DispatchContext dctx, Map<String, ? extends Object> context) updateAllocatedQuantityOnOrderItemChange
(DispatchContext dctx, Map<String, ? extends Object> context) updateAllocationPlanItems
(DispatchContext dctx, Map<String, ? extends Object> context) updateApprovedOrderItems
(DispatchContext dctx, Map<String, ? extends Object> context) updateOrderItemShipGroupAssoc
(DispatchContext dctx, Map<String, Object> context) Update orderItem and shipgroup associationupdateOrderPaymentPreference
(DispatchContext dctx, Map<String, ? extends Object> context) updateShipGroupShipInfo
(DispatchContext dctx, Map<String, ? extends Object> context) This service runs when you update shipping method of Order from order view page.updateTrackingNumber
(DispatchContext dctx, Map<String, ? extends Object> context) Service to update the order tracking number
-
Constructor Details
-
OrderServices
public OrderServices()
-
-
Method Details
-
createOrder
public static Map<String,Object> createOrder(DispatchContext ctx, Map<String, ? extends Object> context) Service for creating a new order -
countProductQuantityOrdered
-
reserveInventory
public static void reserveInventory(Delegator delegator, LocalDispatcher dispatcher, GenericValue userLogin, Locale locale, List<GenericValue> orderItemShipGroupInfo, List<String> dropShipGroupIds, Map<String, GenericValue> itemValuesBySeqId, String orderTypeId, String productStoreId, List<String> resErrorMessages) throws GeneralException- Throws:
GeneralException
-
getProductName
-
getProductName
-
determineSingleFacilityFromOrder
-
resetGrandTotal
public static Map<String,Object> resetGrandTotal(DispatchContext ctx, Map<String, ? extends Object> context) Service for resetting the OrderHeader grandTotal -
setEmptyGrandTotals
public static Map<String,Object> setEmptyGrandTotals(DispatchContext ctx, Map<String, ? extends Object> context) Service for setting the OrderHeader grandTotal for all OrderHeaders with no grandTotal -
recalcOrderTax
public static Map<String,Object> recalcOrderTax(DispatchContext ctx, Map<String, ? extends Object> context) Service for checking and re-calc the tax amount -
recalcOrderShipping
public static Map<String,Object> recalcOrderShipping(DispatchContext ctx, Map<String, ? extends Object> context) Service for checking and re-calc the shipping amount -
checkItemStatus
public static Map<String,Object> checkItemStatus(DispatchContext ctx, Map<String, ? extends Object> context) Service for checking to see if an order is fully completed or canceled -
cancelOrderItem
public static Map<String,Object> cancelOrderItem(DispatchContext ctx, Map<String, ? extends Object> context) Service to cancel an order item quantity -
setItemStatus
public static Map<String,Object> setItemStatus(DispatchContext ctx, Map<String, ? extends Object> context) Service for changing the status on order item(s) -
setOrderStatus
public static Map<String,Object> setOrderStatus(DispatchContext ctx, Map<String, ? extends Object> context) Service for changing the status on an order header -
updateTrackingNumber
public static Map<String,Object> updateTrackingNumber(DispatchContext dctx, Map<String, ? extends Object> context) Service to update the order tracking number -
addRoleType
public static Map<String,Object> addRoleType(DispatchContext ctx, Map<String, ? extends Object> context) Service to add a role type to an order -
removeRoleType
public static Map<String,Object> removeRoleType(DispatchContext ctx, Map<String, ? extends Object> context) Service to remove a role type from an order -
sendOrderConfirmNotification
public static Map<String,Object> sendOrderConfirmNotification(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with initial order confirmation -
sendOrderCompleteNotification
public static Map<String,Object> sendOrderCompleteNotification(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order changes -
sendOrderBackorderNotification
public static Map<String,Object> sendOrderBackorderNotification(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order changes -
sendOrderChangeNotification
public static Map<String,Object> sendOrderChangeNotification(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order changes -
sendOrderPayRetryNotification
public static Map<String,Object> sendOrderPayRetryNotification(DispatchContext ctx, Map<String, ? extends Object> context) Service to email a customer with order payment retry results -
sendOrderNotificationScreen
-
sendProcessNotification
public static Map<String,Object> sendProcessNotification(DispatchContext ctx, Map<String, ? extends Object> context) Service to email order notifications for pending actions -
getOrderHeaderInformation
public static Map<String,Object> getOrderHeaderInformation(DispatchContext dctx, Map<String, ? extends Object> context) Service to get order header information as standard results. -
getOrderShippingAmount
public static Map<String,Object> getOrderShippingAmount(DispatchContext dctx, Map<String, ? extends Object> context) Service to get the total shipping for an order. -
getOrderAddress
public static Map<String,Object> getOrderAddress(DispatchContext dctx, Map<String, ? extends Object> context) Service to get an order contact mech. -
createOrderNote
public static Map<String,Object> createOrderNote(DispatchContext dctx, Map<String, ? extends Object> context) Service to create a order header note. -
allowOrderSplit
-
cancelFlaggedSalesOrders
-
checkDigitalItemFulfillment
-
fulfillDigitalItems
-
invoiceServiceItems
public static Map<String,Object> invoiceServiceItems(DispatchContext dctx, Map<String, ? extends Object> context) Service to invoice service items from order -
addItemToApprovedOrder
-
updateApprovedOrderItems
-
loadCartForUpdate
-
saveUpdatedCartToOrder
-
processOrderPayments
-
shoppingCartTest
-
shoppingCartRemoteTest
-
createPaymentFromPreference
public static Map<String,Object> createPaymentFromPreference(DispatchContext dctx, Map<String, ? extends Object> context) Service to create a payment using an order payment preference.- Returns:
- Map
-
massChangeApproved
-
massCancelOrders
-
massRejectOrders
-
massHoldOrders
-
massProcessOrders
-
massChangeOrderStatus
-
massChangeItemStatus
-
massQuickShipOrders
-
massPickOrders
-
massPrintOrders
-
massCreateFileForOrders
-
massCancelRemainingPurchaseOrderItems
-
checkCreateDropShipPurchaseOrders
-
updateOrderPaymentPreference
-
generateReqsFromCancelledPOItems
public static Map<String,Object> generateReqsFromCancelledPOItems(DispatchContext dctx, Map<String, ? extends Object> context) Generates a product requirement for the total cancelled quantity over all order items for each product- Parameters:
dctx
- the dispatch contextcontext
- the context- Returns:
- the result of the service execution
-
cancelRemainingPurchaseOrderItems
public static Map<String,Object> cancelRemainingPurchaseOrderItems(DispatchContext dctx, Map<String, ? extends Object> context) Cancels remaining (unreceived) quantities for items of an order. Does not consider received-but-rejected quantities.- Parameters:
dctx
- the dispatch contextcontext
- the context- Returns:
- cancels remaining (unreceived) quantities for items of an order
-
createSimpleNonProductSalesOrder
-
createOrderFromShoppingCart
-
callProcessOrderPayments
-
getOrderItemInvoicedAmountAndQuantity
public static Map<String,Object> getOrderItemInvoicedAmountAndQuantity(DispatchContext dctx, Map<String, ? extends Object> context) Determines the total amount invoiced for a given order item over all invoices by totalling the item subtotal (via OrderItemBilling), any adjustments for that item (via OrderAdjustmentBilling), and the item's share of any order-level adjustments (that calculated by applying the percentage of the items total that the item represents to the order-level adjustments total (also via OrderAdjustmentBilling). Also returns the quantity invoiced for the item over all invoices, to aid in prorating.- Parameters:
dctx
- DispatchContextcontext
- Map- Returns:
- Map
-
setOrderPaymentStatus
-
runSubscriptionAutoReorders
-
addOrderItemShipGroup
public static Map<String,Object> addOrderItemShipGroup(DispatchContext dctx, Map<String, Object> context) Create an OrderItemShipGroup record- Parameters:
dctx
-context
-- Returns:
-
deleteOrderItemShipGroup
public static Map<String,Object> deleteOrderItemShipGroup(DispatchContext ctx, Map<?, ?> context) throws GenericEntityExceptionRemove an OrderItemShipGroup record- Parameters:
ctx
-context
- a map containing in paramaters- Returns:
- result: a map containing out parameters
- Throws:
GenericEntityException
-
addOrderItemShipGroupAssoc
public static Map<String,Object> addOrderItemShipGroupAssoc(DispatchContext dctx, Map<String, Object> context) throws GenericEntityExceptionCreate orderItem and shipGroup association- Parameters:
dctx
-context
-- Returns:
- Throws:
GenericEntityException
-
updateOrderItemShipGroupAssoc
public static Map<String,Object> updateOrderItemShipGroupAssoc(DispatchContext dctx, Map<String, Object> context) throws GeneralExceptionUpdate orderItem and shipgroup association- Parameters:
dctx
-context
-- Returns:
- Throws:
GeneralException
-
setShippingInstructions
-
setGiftMessage
-
createAlsoBoughtProductAssocs
-
createAlsoBoughtProductAssocsForOrder
-
updateShipGroupShipInfo
public static Map<String,Object> updateShipGroupShipInfo(DispatchContext dctx, Map<String, ? extends Object> context) This service runs when you update shipping method of Order from order view page. -
associateOrderWithAllocationPlans
-
approveAllocationPlanItems
-
cancelAllocationPlanItems
-
changeAllocationPlanStatus
-
changeAllocationPlanItemStatus
-
completeAllocationPlanItemByOrderItem
-
cancelAllocationPlanItemByOrderItem
-
updateAllocatedQuantityOnOrderItemChange
-
createAllocationPlanAndItems
-
isInventoryAllocationRequired
-
updateAllocationPlanItems
-
sendPOEmail
-