📄 ordermanagement.java
字号:
/*
* @author : Sujatha
* @Version : 1.0
*
* Development Environment : Oracle 9i JDeveloper
* Name of the File : OrderManagement.java
* Creation/Modification History :
*
* Sujatha 11-Dec-2002 Created
*
*/
package oracle.otnsamples.vsm.services;
import java.rmi.RemoteException;
import javax.ejb.EJBObject;
import oracle.otnsamples.vsm.services.data.Address;
import oracle.otnsamples.vsm.services.data.Order;
/**
* This is the interface for Order management Service. The interface provides
* method signatures for Order management Services like look up all orders for
* a user, retrieve pending orders for a shop, updation of shipping address
* information etc.
*/
public interface OrderManagement extends EJBObject {
/**
* This business method retrieves all orders placed by a mall user
*
* @param <b>userName</b> - userName of the user whose order information has
* to be queried
* @param <b>count</b> - number of latest orders to be queried
*
* @return <b>Order[]</b> - array of order value objects having latest order
* information
*
* @throws <b>OrderException</b> if the orders could not be fetched
* @throws <b>RemoteException</b> container error
*/
Order[] getLatestOrdersForUser(String userName, int count)
throws OrderException,
RemoteException;
/**
* This business method retrieves all orders to be shipped by a shop
*
* @param <b>shopID</b> - ID of the shop for which pending orders have to be
* queried
*
* @return <b>Order[]</b> - array of order value objects having order
* information
*
* @throws <b>OrderException</b> if the orders could not be fetched
* @throws <b>RemoteException</b> container error
*/
Order[] getPendingOrdersForShop(String shopID)
throws OrderException,
RemoteException;
/**
* This business method cancels a specified order
*
* @param <b>orderID</b> - id of the order that has to be cancelled
* @param <b>itemID</b> - id of the item that has to be cancelled
*
* @throws <b>OrderException</b> if the orders could not be cancelled
* @throws <b>RemoteException</b> container error
*/
void cancelOrderItem(String orderID, String itemID)
throws OrderException,
RemoteException;
/**
* This business method retrieves information about a specified order
*
* @param <b>orderID</b> - id of the order which has to be queried
*
* @return <b>Order</b> - order value object having order information
*
* @throws <b>OrderException</b> if the orders could not be fetched
* @throws <b>RemoteException</b> container error
*/
Order getOrder(String orderID) throws OrderException,
RemoteException;
/**
* This business method changes the shipping address for a given order
*
* @param <b>address</b> - the new shipping address
* @param <b>orderID</b> - id of the order for which the shipping address has
* to be modified
*
* @throws <b>OrderException</b> if the shipping address could not be changed
* @throws <b>RemoteException</b> container error
*/
void changeShippingAddress(Address address, String orderID)
throws OrderException,
RemoteException;
/**
* This business method retrieves the shipping address for a given order
*
* @param <b>orderID</b> - id of the order for which the shipping address has
* to be modified
*
* @return <b>address</b> - the shipping address
*
* @throws <b>OrderException</b> if the shipping address could not be
* retrieved
* @throws <b>RemoteException</b> container error
*/
Address getShippingAddress(String orderID)
throws OrderException,
RemoteException;
/**
* This business method retrieves information for a given item
*
* @param <b>itemID</b> - ID of the item that has to be queried
* @param <b>langID</b> - language in which the item information is required
*
* @return <b>String</b> - the item name
*
* @throws <b>OrderException</b> if the item could not be queried
* @throws <b>RemoteException</b> container error
*/
String getItemName(String itemID, String langID)
throws OrderException,
RemoteException;
/**
* This business method retrieves orders for a given user
*
* @param <b>userName</b> - user for whom the orders have to be looked up
*
* @return <b>Order[]</b> - array of order value objects having order
* information
*
* @throws <b>OrderException</b> if the order information could not be
* retrieved
* @throws <b>RemoteException</b> container error
*/
Order[] getOrdersForUser(String userName)
throws OrderException,
RemoteException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -