5cf74f532ac553622edf70864949d4018509fb57
[RRRRHHHH_Code] / ruralHouses / src / businessLogic / ApplicationFacadeInterface.java
1 package businessLogic;
2
3 import java.rmi.*;
4 import java.util.Vector;
5 import java.sql.Date;
6
7 import domain.Booking;
8 import domain.Offer;
9 import domain.Owner;
10 import domain.RuralHouse;
11
12
13 import exceptions.OfferCanNotBeBooked; 
14
15
16 public interface ApplicationFacadeInterface extends Remote {
17         
18
19         /**
20          * This method creates an offer with a house number, first day, last day and price
21          * 
22          * @param House
23          *            number, start day, last day and price
24          * @return None
25          */
26
27
28         Offer createOffer(RuralHouse ruralHouse, Date firstDay, Date lastDay,
29                         float price) throws RemoteException, Exception;
30
31         /**
32          * This method creates a book with a corresponding parameters
33          * 
34          * @param First
35          *            day, last day, house number and telephone
36          * @return a book
37          */
38         Booking createBooking(RuralHouse ruralHouse, Date firstDay, Date lastDay,
39                         String telephoneNumber) throws RemoteException,
40                         OfferCanNotBeBooked;
41
42         
43         /**
44          * This method retrieves the existing  owners 
45          * 
46          * @return a Set of owners
47          */
48         public Vector<Owner> getOwners() throws RemoteException,
49                         Exception;
50         
51         /**
52          * This method retrieves the existing  rural houses 
53          * 
54          * @return a Set of rural houses
55          */
56         public Vector<RuralHouse> getAllRuralHouses()throws RemoteException,
57         Exception;
58         
59         public void close() throws RemoteException;
60
61
62         
63 }