|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WC
Workflow Controller stub
| Method Summary | |
|---|---|
void |
abort(Transaction context)
Abort a transaction |
boolean |
addCars(Transaction context,
String location,
int numCars,
int price)
Add cars to a location. |
boolean |
addRooms(Transaction context,
String location,
int numRooms,
int price)
Add rooms to a location. |
boolean |
addSeats(Transaction context,
String flight,
int flightSeats,
int flightPrice)
Add seats to a flight This method will be used to create a new flight but if the flight already exists, seats will be added and the price overwritten |
boolean |
cancelItinerary(Customer customer)
Cancel an itinerary owned by customer |
void |
commit(Transaction context)
Commit a transaction |
boolean |
deleteCars(Transaction context,
String location,
int numCars)
Delete cars. |
boolean |
deleteFlight(Transaction context,
String flight)
Delete the entire flight. |
boolean |
deleteRooms(Transaction context,
String location,
int numRooms)
Delete rooms. |
boolean |
deleteSeats(Transaction context,
String flight,
int numSeats)
delete seats from a flight |
String[] |
listCars(Transaction context)
list existing cars |
Customer[] |
listCustomers(Transaction context)
list existing customers that have itinerary |
String[] |
listFlights(Transaction context)
list existing flights |
String[] |
listRooms(Transaction context)
list existing rooms |
int |
queryCar(Transaction context,
String location)
Get the number of cars available. |
int |
queryCarPrice(Transaction context,
String location)
Get the cars price. |
int |
queryFlight(Transaction context,
String flight)
Get the number of seats available. |
int |
queryFlightPrice(Transaction context,
String flight)
Get the flight price. |
String |
queryItinerary(Transaction context,
Customer customer)
Get the bill for the customer |
int |
queryItineraryPrice(Transaction context,
Customer customer)
Get the total amount of money the customer owes |
int |
queryRoom(Transaction context,
String location)
Get the number of rooms available. |
int |
queryRoomPrice(Transaction context,
String location)
Get the room price. |
boolean |
reserveItinerary(Customer customer,
String[] flights,
String location,
boolean car,
boolean room)
Reserve an itinerary |
Transaction |
start()
Start a transaction return a unique transaction ID |
| Method Detail |
|---|
boolean reserveItinerary(Customer customer,
String[] flights,
String location,
boolean car,
boolean room)
throws RemoteException
customer - the customerflights - an integer array of flight numberslocation - travel locationcar - true if car reservation is neededroom - true if a room reservation is needed
true on success, false otherwise.
RemoteExceptionRM.reserve(Transaction, Customer, RID)
boolean cancelItinerary(Customer customer)
throws RemoteException
customer
customer - the customer
true on success, false otherwise.
RemoteExceptionRM.unreserve(Transaction, Customer)
String queryItinerary(Transaction context,
Customer customer)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
customer
context - the transaction IDcustomer - the customer ID
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.queryReserved(Transaction, Customer)
int queryItineraryPrice(Transaction context,
Customer customer)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
customer owes
context - the transaction IDcustomer - the customer ID
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.queryReserved(Transaction, Customer)
boolean addSeats(Transaction context,
String flight,
int flightSeats,
int flightPrice)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDflight - a flight numberflightSeats - the number of flight SeatsflightPrice - price per seat
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.add(Transaction, RID, int, int)
boolean deleteSeats(Transaction context,
String flight,
int numSeats)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
flight
context - the transaction IDflight - a flight numbernumSeats - the number of flight Seats
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.delete(Transaction,RID,int)
boolean deleteFlight(Transaction context,
String flight)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDflight - the flight number
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.delete(Transaction,RID)
boolean addRooms(Transaction context,
String location,
int numRooms,
int price)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the location to add roomsnumRooms - number of rooms to addprice - room price
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.add(Transaction, RID, int, int)
boolean deleteRooms(Transaction context,
String location,
int numRooms)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the location to add roomsnumRooms - the number of rooms to delete
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.delete(Transaction,RID,int)
boolean addCars(Transaction context,
String location,
int numCars,
int price)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the location to add carsnumCars - number of cars to addprice - rental price
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.add(Transaction, RID, int, int)
boolean deleteCars(Transaction context,
String location,
int numCars)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the location to add carsnumCars - the number of cars to delete
true on success, false otherwise.
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.delete(Transaction,RID,int)
int queryFlight(Transaction context,
String flight)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDflight - the flight number
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.query(Transaction, RID)
int queryFlightPrice(Transaction context,
String flight)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDflight - the flight number
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.queryPrice(Transaction, RID)
int queryRoom(Transaction context,
String location)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the rooms location
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.query(Transaction, RID)
int queryRoomPrice(Transaction context,
String location)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the rooms location
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.queryPrice(Transaction, RID)
int queryCar(Transaction context,
String location)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the cars location
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.query(Transaction, RID)
int queryCarPrice(Transaction context,
String location)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - the transaction IDlocation - the cars location
RemoteException
TransactionAbortedException
InvalidTransactionExceptionRM.queryPrice(Transaction, RID)
String[] listFlights(Transaction context)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - transaction id
RemoteException
TransactionAbortedException
InvalidTransactionExceptionaddSeats(Transaction, String, int, int),
RM.listResources(Transaction, RID.Type)
String[] listCars(Transaction context)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - transaction id
RemoteException
TransactionAbortedException
InvalidTransactionExceptionaddCars(Transaction, String, int, int),
RM.listResources(Transaction, RID.Type)
String[] listRooms(Transaction context)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - transaction id
RemoteException
TransactionAbortedException
InvalidTransactionExceptionaddRooms(Transaction, String, int, int),
RM.listResources(Transaction, RID.Type)
Customer[] listCustomers(Transaction context)
throws RemoteException,
TransactionAbortedException,
InvalidTransactionException
context - transaction id
RemoteException
TransactionAbortedException
InvalidTransactionExceptionreserveItinerary(Customer, String[], String, boolean, boolean),
RM.listCustomers(Transaction)
Transaction start()
throws RemoteException
RemoteException
void commit(Transaction context)
throws RemoteException,
InvalidTransactionException,
TransactionAbortedException
context - the transaction ID
RemoteException
InvalidTransactionException
TransactionAbortedException
void abort(Transaction context)
throws RemoteException,
InvalidTransactionException
context - the transaction ID
RemoteException
InvalidTransactionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||