Class CancelAndReplaceOrderHook
- java.lang.Object
-
- org.openbravo.erpCommon.businessUtility.CancelAndReplaceOrderHook
-
public abstract class CancelAndReplaceOrderHook extends Object
Abstract class created to implement hooks inside Cancel and Replace process. All hooks in that process must extend this class so they implement exec process.- Author:
- openbravo
-
-
Constructor Summary
Constructors Constructor Description CancelAndReplaceOrderHook()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
exec(boolean replaceOrder, boolean triggersDisabled, Order oldOrder, List<Order> newOrders, Order inverseOrder, org.codehaus.jettison.json.JSONObject jsonorder)
Exec method that hooks extending this class can implement.abstract void
exec(boolean replaceOrder, boolean triggersDisabled, Order oldOrder, Order newOrder, Order inverseOrder, org.codehaus.jettison.json.JSONObject jsonorder)
Exec method that all hooks extending this abstract class must implement.
-
-
-
Method Detail
-
exec
public abstract void exec(boolean replaceOrder, boolean triggersDisabled, Order oldOrder, Order newOrder, Order inverseOrder, org.codehaus.jettison.json.JSONObject jsonorder) throws Exception
Exec method that all hooks extending this abstract class must implement.- Parameters:
replaceOrder
- boolean that informs if the old sales order has been replaced or not.triggersDisabled
- boolean that informs if triggers have been disabled previous to execute this hook.oldOrder
- Sales Order that has been replaced.newOrder
- New Sales Order that has replaced the old Sales OrderinverseOrder
- New Sales Order equal to old sales order but with negative quantities. Cancellation Order.jsonorder
- JSONObject with information of the order coming with values when the hook is invoked because the Cancel and Replace has been executed from Web POS.- Throws:
Exception
-
exec
public void exec(boolean replaceOrder, boolean triggersDisabled, Order oldOrder, List<Order> newOrders, Order inverseOrder, org.codehaus.jettison.json.JSONObject jsonorder) throws Exception
Exec method that hooks extending this class can implement. This method is only executed when running cancel and replace flow for many replacements, usingCancelAndReplaceUtils.cancelAndReplaceOrder(String, Set, String, JSONObject, boolean)
.- Parameters:
replaceOrder
- boolean that informs if the old sales order has been replaced or not.triggersDisabled
- boolean that informs if triggers have been disabled previous to execute this hook.oldOrder
- Sales Order that has been replaced.newOrders
- New Sales Orders that have replaced the old Sales OrderinverseOrder
- New Sales Order equal to old sales order but with negative quantities. Cancellation Order.jsonorder
- JSONObject with information of the order coming with values when the hook is invoked because the Cancel and Replace has been executed from Web POS.- Throws:
Exception
-
-