Class CancelAndReplaceOrderHookCaller


  • public class CancelAndReplaceOrderHookCaller
    extends Object
    Public class implemented to execute all hooks of type CancelAndReplaceOrderHook. This class is called from Cancel and Replace process.
    • Constructor Detail

      • CancelAndReplaceOrderHookCaller

        public CancelAndReplaceOrderHookCaller()
    • Method Detail

      • executeHook

        public void executeHook​(boolean replaceOrder,
                                boolean triggersDisabled,
                                Order oldOrder,
                                Order newOrder,
                                Order inverseOrder,
                                org.codehaus.jettison.json.JSONObject jsonorder)
                         throws Exception
        Method that executes all classes of type CancelAndReplaceOrderHook.
        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 Order
        inverseOrder - 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
      • executeHook

        public void executeHook​(boolean replaceOrder,
                                boolean triggersDisabled,
                                Order oldOrder,
                                List<Order> newOrders,
                                Order inverseOrder,
                                org.codehaus.jettison.json.JSONObject jsonorder)
                         throws Exception
        Method that executes all classes of type CancelAndReplaceOrderHook.
        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 Order that has replaced the old Sales Order
        inverseOrder - 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