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