The code for different owner operations mostly implemented
[RRRRHHHH_Code] / ruralHouses / src / businessLogic / ApplicationFacadeInterface.java
1 package businessLogic;
2
3 import java.rmi.*;
4
5 import java.util.Vector;
6 import java.util.Date;
7
8 import domain.Booking;
9 import domain.Offer;
10 import domain.Owner;
11 import domain.RuralHouse;
12
13 import exceptions.OfferCanNotBeBooked; 
14
15 public interface ApplicationFacadeInterface extends Remote {
16
17         /**
18          * This method obtains an owner's rural houses 
19          * 
20          * @param owner object
21          *            
22          * @return a vector of Rural Houses
23          */
24         Vector<RuralHouse> getRuralHouses(Owner owner)
25                         throws RemoteException;
26
27         /**
28          * This method creates an offer with a house number, first day, last day and price
29          * 
30          * @param House
31          *            number, start day, last day and price
32          * @return None
33          */
34
35         Offer createOffer(RuralHouse ruralHouse, Date firstDay, Date lastDay,
36                         float price) throws RemoteException, Exception;
37
38         /**
39          * This method creates a book with a corresponding parameters
40          * 
41          * @param First
42          *            day, last day, house number and telephone
43          * @return a book
44          */
45         Booking createBooking(RuralHouse ruralHouse, Date firstDay, Date lastDay,
46                         String telephoneNumber) throws RemoteException, OfferCanNotBeBooked;
47
48         /**
49          * This method obtains available offers for a concrete house in a certain period 
50          * 
51          * @param houseNumber, the house number where the offers must be obtained 
52          * @param firstDay, first day in a period range 
53          * @param lastDay, last day in a period range
54          * @return a vector of offers(Offer class)  available  in this period
55          */
56         Vector<Offer> getOffers(RuralHouse houseNumber, Date firstDay, Date lastDay) 
57                         throws RemoteException, Exception;
58         
59         /**
60          * This method finds existing  owners 
61          * 
62          */
63         public Vector<Owner> getOwners() throws RemoteException,
64                         Exception;
65         
66         
67         
68         public Vector<RuralHouse> getAllRuralHouses()throws RemoteException,
69         Exception;
70         
71 }