Interface BookingPresenter
- All Known Implementing Classes:
ServedBookingPresenter
public interface BookingPresenter
This interface provides methods for operating on the booking application and notifies
the view(s) about changes.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates and inserts a new client in the repository and notifies the view(s) about the changes.void
addReservation
(Client client, String date) Creates and inserts a new reservation in the repository and notifies the view(s) about the changes.void
Provides all the existing clients in the repository to the view(s).void
Provides all the existing reservations in the repository to the view(s).void
deleteClient
(Client client) Removes an existing client and all his reservations from the repository and notifies the view(s) about the changes.void
deleteReservation
(Reservation reservation) Removes an existing reservation from the repository and notifies the view(s) about the changes.void
renameClient
(Client client, String newFirstName, String newLastName) Modifies names of an existing client and notifies the view(s) about the changes.void
rescheduleReservation
(Reservation reservation, String newDate) Modifies the date of an existing reservation and notifies the view(s) about the changes.
-
Method Details
-
allClients
void allClients()Provides all the existing clients in the repository to the view(s). -
allReservations
void allReservations()Provides all the existing reservations in the repository to the view(s). -
deleteClient
Removes an existing client and all his reservations from the repository and notifies the view(s) about the changes.- Parameters:
client
- the client to delete.
-
deleteReservation
Removes an existing reservation from the repository and notifies the view(s) about the changes.- Parameters:
reservation
- the reservation to delete.
-
addClient
Creates and inserts a new client in the repository and notifies the view(s) about the changes.- Parameters:
firstName
- the name of the client to add.lastName
- the surname of the client to add.
-
addReservation
Creates and inserts a new reservation in the repository and notifies the view(s) about the changes.- Parameters:
client
- the associated client of the reservation to add.date
- the date of the reservation to add.
-
renameClient
Modifies names of an existing client and notifies the view(s) about the changes.- Parameters:
client
- the client to modify.newFirstName
- the new name for the client.newLastName
- the new surname for the client.
-
rescheduleReservation
Modifies the date of an existing reservation and notifies the view(s) about the changes.- Parameters:
reservation
- the reservation to modify.newDate
- the new date for the reservation.
-