org.cocome.tradingsystem.inventory.application.productdispatcher
Interface ProductDispatcherIf

All Known Implementing Classes:
ProductDispatcher

public interface ProductDispatcherIf

This interface provides enterprise specific business logic (business logic that is not available for stores)

Author:
kelsaka

Method Summary
 ProductAmountTO[] orderProductsAvailableAtOtherStores(EnterpriseTO enterpriseTO, StoreTO callingStore, java.util.Collection<ProductAmountTO> productAmounts)
          Executes a query to search for a product (that ran out of stock at one store) at other stores in the region.
 

Method Detail

orderProductsAvailableAtOtherStores

ProductAmountTO[] orderProductsAvailableAtOtherStores(EnterpriseTO enterpriseTO,
                                                      StoreTO callingStore,
                                                      java.util.Collection<ProductAmountTO> productAmounts)
                                                      throws java.rmi.RemoteException
Executes a query to search for a product (that ran out of stock at one store) at other stores in the region.

Required for Use-Case 8 (product exchange (on low stock) among stores). Called by an InventoryApplication.

Parameters:
callingStore - The store running out of stock.
enterpriseTO - The enterprise managing the transfer
productAmounts - The products running out at the calling store and the required amount of those products.
Returns:
Returns a list of the required products that will be made available by the enterprise. The included amount of products might be "0" to indicate that a product is not available in the enterprise.

Products that are indicates to be available (amount > 0) are prepared for delivery by the delivering store (markProductsUnavailableInStock).

Throws:
java.rmi.RemoteException