com.konakart.bl
Interface OrderIntegrationMgrInterface

All Known Implementing Classes:
OrderIntegrationMgr

public interface OrderIntegrationMgrInterface

The interface that must be implemented by an Order Integration Manager


Method Summary
 OrderIf beforeSaveOrder(OrderIf order)
          Called just before an order has been saved.
 void changeOrderStatus(int orderId, int currentStatus, int newStatus)
          Called just after an order status change
 java.lang.String createOrderNumber(OrderIf order)
          This method allows you to introduce a proprietary algorithm for creating the order number for an order just before the order is saved.
 java.lang.String createTrackingNumber(OrderIf order)
          This method allows you to generate a tracking number for an order just before the order is saved.
 void saveOrder(OrderIf order)
          Called just after an order has been saved.
 

Method Detail

saveOrder

void saveOrder(OrderIf order)
Called just after an order has been saved. The order details are passed to the method so that all the information should be available in order to integrate with external systems.

Parameters:
order -

beforeSaveOrder

OrderIf beforeSaveOrder(OrderIf order)
Called just before an order has been saved. This method gives the opportunity to modify any detail of the order before it is saved. If null is returned, then no action is taken. If a non null Order is returned, then this is the order that will be saved.

Parameters:
order -
Returns:
Returns an order object which will be saved

changeOrderStatus

void changeOrderStatus(int orderId,
                       int currentStatus,
                       int newStatus)
Called just after an order status change

Parameters:
orderId -
currentStatus -
newStatus -

createOrderNumber

java.lang.String createOrderNumber(OrderIf order)
                                   throws java.lang.Exception
This method allows you to introduce a proprietary algorithm for creating the order number for an order just before the order is saved. It is called by the saveOrder() method. The value returned by this method populates the orderNumber attribute of the order when it is saved.
If a null value is returned, then the order number of the order is left unchanged.
If an exception is thrown, the exception will be also thrown by the saveOrder() method and the order will not be saved.

Parameters:
order -
Returns:
Return the order number for the new order
Throws:
java.lang.Exception

createTrackingNumber

java.lang.String createTrackingNumber(OrderIf order)
                                      throws java.lang.Exception
This method allows you to generate a tracking number for an order just before the order is saved. It is called by the saveOrder() method. The value returned by this method populates the trackingNumber attribute of the order when it is saved.
If a null value is returned, then the tracking number of the order is left unchanged.
If an exception is thrown, the exception will be also thrown by the saveOrder() method and the order will not be saved.

Parameters:
order -
Returns:
Return the tracking number for the new order
Throws:
java.lang.Exception


Copyright © 2011 DS Data Systems UK Ltd.