- All Known Implementing Classes:
BlFacadeImplementation
public interface BlFacade
Interface that specifies the business logic for the Hotel Reservation system.
-
Method Summary
Modifier and TypeMethodDescriptiongetAvailableRooms(String hotelName, LocalDate startDate, LocalDate endDate) Queries available room types for a given hotel and date range.Returns the list of all hotels registered in the system.voidjoinWaitingList(String hotelName, String roomType, LocalDate startDate, LocalDate endDate) Registers the current customer on the waiting list for the given room type at the specified hotel and date range.voidreserveRoom(AvailableRoomModel room, LocalDate startDate, LocalDate endDate) Creates a reservation for the selected room type and charges 20% of the total price upfront as an advance payment.
-
Method Details
-
getHotels
-
getAvailableRooms
List<AvailableRoomModel> getAvailableRooms(String hotelName, LocalDate startDate, LocalDate endDate) Queries available room types for a given hotel and date range.Only room types that have at least one available room for the entire stay (all days between
startDateandendDate) are returned. The total price is calculated day-by-day, respecting different rates on different dates (e.g. peak-season pricing).- Parameters:
hotelName- the name of the hotelstartDate- check-in date (inclusive)endDate- check-out date (exclusive)- Returns:
- list of available room types with daily and total prices
-
reserveRoom
Creates a reservation for the selected room type and charges 20% of the total price upfront as an advance payment.A concrete
Roomis assigned from the pool of available rooms of that type at the hotel.- Parameters:
room- the room type model selected by the userstartDate- check-in dateendDate- check-out date
-
joinWaitingList
Registers the current customer on the waiting list for the given room type at the specified hotel and date range.This is typically used when no rooms of the desired type are available.
- Parameters:
hotelName- the hotel nameroomType- the desired room type (e.g. "simple", "doble", "suite")startDate- desired check-in dateendDate- desired check-out date
-