001: // OrderEntryClerk.java
002:
003: package org.objectweb.jonas.stests.appli;
004:
005: import java.util.Vector;
006: import java.rmi.RemoteException;
007: import javax.ejb.EJBObject;
008:
009: /**
010: * OrderEntryClerk remote interface
011: */
012: public interface OrderEntryClerk extends EJBObject {
013:
014: /**
015: * Retrieve all available customers
016: *
017: * @return Vector
018: * @exception java.rmi.RemoteException Remote exception
019: */
020:
021: public Vector findAllCustomers() throws RemoteException;
022:
023: /**
024: * Set the current cutomer for this stateful Session Bean.
025: * <p>
026: * @param cid Customer ID to set <i>(Mandatory)</i>
027: * @return void
028: * @exception CpwejbException Application exception
029: * @exception java.rmi.RemoteException Remote exception
030: */
031: public void setCustomer(Integer cid) throws RemoteException,
032: CpwejbException;
033:
034: /**
035: * Find all available items
036: * <p>
037: * <strong>Note:</strong> This method will return a Vector of String Arrays
038: * each String Array contains:
039: * <ul>
040: * <li> String 0 - Item ID
041: * <li> String 1 - Item Description
042: * <li> String 2 - Item Price
043: * <li> String 3 - Item Quantity in Stock
044: * <li> String 4 - Item Data
045: * </ul>
046: * @return Vector
047: * @exception java.rmi.RemoteException Remote exception
048: */
049: public Vector findAllItems() throws RemoteException;
050:
051: /**
052: * Retrieve available items within a range of item IDs
053: * <p>
054: * <strong>Note:</strong> This method will return a Vector of String Arrays
055: * each String Array contains:
056: * <ul>
057: * <li> String 0 - Item ID
058: * <li> String 1 - Item Description
059: * <li> String 2 - Item Price
060: * <li> String 3 - Item Quantity in Stock
061: * <li> String 4 - Item Data
062: * </ul>
063: * @return Vector
064: * @exception java.rmi.RemoteException Remote exception
065: */
066:
067: public Vector findRangeOfItems(Integer lowID, Integer highID)
068: throws RemoteException;
069:
070: /**
071: * Create an order detail (order line). Add an item and quantity to the order.
072: * <p>
073: * @param iid Item ID to set <i>(Mandatory)</i>
074: * @param quantity amount of the item to be placed on order <i>(Mandatory)</i>
075: * @return void
076: * @exception java.rmi.RemoteException Remote exception
077: */
078:
079: public void addOrderLine(Integer iid, int quantity)
080: throws RemoteException;
081:
082: /* The undoAll method : added by BULL */
083: /**
084: * Reset the OrderEntryClerk state ie the current customer and the current order
085: */
086:
087: public void undoAll() throws RemoteException;
088:
089: /**
090: * Verify the existence of a customer in this districts tables.
091: * <p>
092: * @param cid Customer ID to check for <i>(Mandatory)</i>
093: * @return boolean
094: * @exception java.rmi.RemoteException Remote exception
095: */
096:
097: public boolean verifyCustomer(Integer cid) throws RemoteException;
098:
099: /**
100: * Place an order.
101: * If successful, this method will return the order number
102: * <p>
103: * @return String
104: * @exception CpwejbException Application exception
105: * @exception java.rmi.RemoteException Remote exception
106: */
107:
108: public String placeOrder() throws RemoteException, CpwejbException;
109:
110: /**
111: * Get the cutomer for a given order. The order is located by its warehouse,
112: * district, and order number. The returned information is:
113: * <ul>
114: * <li> String 0 - Customer ID
115: * <li> String 1 - Customer first name
116: * <li> String 2 - Customer initials
117: * <li> String 3 - Customer last name
118: * </ul>
119: * <p>
120: * @param wid Warehouse ID
121: * @param did District ID
122: * @param oid Order ID
123: * @return String
124: * @exception CpwejbException Application exception
125: * @exception java.rmi.RemoteException Remote exception
126: */
127:
128: public String[] getCustomerForOrder(String wid, int did, int oid)
129: throws RemoteException, CpwejbException;
130:
131: /**
132: * Get the items list for a given order. The order is located by its warehouse,
133: * district, and order number. The return information is:
134: * <ul>
135: * <li> String 0 - Order line number
136: * <li> String 1 - Item description
137: * <li> String 2 - Item quanity
138: * <li> String 3 - Order line amount
139: * </ul>
140: * <p>
141: * @param wid Warehouse ID
142: * @param did District ID
143: * @param oid Order ID
144: * @return Vector
145: * @exception CpwejbException Application exception
146: * @exception java.rmi.RemoteException Remote exception
147: */
148:
149: public Vector getItemsForOrder(String wid, int did, int oid)
150: throws RemoteException, CpwejbException;
151:
152: // only for testing purpose
153: public void createAllTables() throws RemoteException,
154: CpwejbException;
155:
156: }
|