|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ModelRMIInterface Public Interface to define RMI THIS INTERFACE IS FOR THE DISPATHCHER UI - PLEASE TELL US WHAT METHODS YOU NEED!!! PLEASE EMAIL INTERFACE CHANGE REQUESTS TO MIKAM TRIBE: margaux, ianli, kkchen, alexcho, meilye
| Method Summary | |
Object |
addCustomer(Customer customer)
Adds a customer in system. PRECONDITION: Customer must have the following information set already: - call-in time - pickup address - pickup time - destination address POSTCONDITION: customer's information is set scheduler now has customer within domain datastore knows of ride request |
Object |
cancelCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
Cancel the customer, returns true for successful cancellation |
Object |
changeCustomer(Customer oldCustomer,
Customer newCustomer)
Changes customer in the system For Dispatcher UI |
Object |
getCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
Returns the Customer identified by the phone number and last name PRECONDITION: scheduler contains the target customer POSTCONDITION: none |
ManagerReport |
getReport(int typeOfReport,
int specificity,
int timeInterval)
For ManagerUI: Given an enumerated type of report, this method will return a Report designed for a manager of the cab company |
ManagerReport |
getReport(int typeOfReport,
int specificity,
int timeInterval,
Date from,
Date to)
Passes ManagerReport request from ManagerUI to DataStore Given an enumerated type of report, this method will return a Report designed for a manager of the cab company |
boolean |
isCreditCardAccepted(double chargedAmount,
String creditCardNumber)
"Approve" credit card -- passes the charge amount and creditCardNumber to bank and sees if the card is approved PRECONDITION: none POSTCONDITION: none |
Boolean |
registerCabToModel(CabConsoleInterface cabConsole,
int cab_id,
int driver_id,
String gps)
registers the cab in the model if cab_id and driver_id are valid (in database) PRECONDITION: both cab and driver identified by cab_id and driver_id registers for the first time. POSTCONDITION: a cab object corresponding to the cab console has been created and placed in its respective zone in the model |
boolean |
updateModelCabInfo(String cust_info)
For Cab Console: Called after console updates referenced cab object, this method triggers necessary model updates Case 0: customer dropped off Case 2: customer has been picked up Case 3: customer has canceled and cab has been canceled PRECONDITION: cab console has changed its status and needs to be updated in the model case 0: cab is busy case 2: none case 3: cab has been emptied of its customer and is in the busy cab list POSTCONDITION: case 0: cab is waiting in its appropriate zone case 2: pickup time for customer in database has been updated case 3: cab waiting at front of zone's cab list |
| Method Detail |
public Object addCustomer(Customer customer)
throws RemoteException
customer - customer object to be added
public Object cancelCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
throws RemoteException
customer_id - customerLastName -
public Object getCustomer(String customerPhone,
String customerLastName,
String customerFirstName)
throws RemoteException
customerPhone - customerLastName -
public Object changeCustomer(Customer oldCustomer,
Customer newCustomer)
throws RemoteException
old - customer - copynew - customer
public boolean updateModelCabInfo(String cust_info)
throws RemoteException
must - be in this format:
public Boolean registerCabToModel(CabConsoleInterface cabConsole,
int cab_id,
int driver_id,
String gps)
throws RemoteException
public boolean isCreditCardAccepted(double chargedAmount,
String creditCardNumber)
throws RemoteException
chargedAmount - amount to chargecreditCardNumber - credit card number
public ManagerReport getReport(int typeOfReport,
int specificity,
int timeInterval)
throws RemoteException
typeOfReport - specificity - timeInterval -
public ManagerReport getReport(int typeOfReport,
int specificity,
int timeInterval,
Date from,
Date to)
throws RemoteException
typeOfReport - - type of reportspecificity - timeInterval - from - - starting date for queryto - - ending date for query
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||