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 Type
    Method
    Description
    void
    addClient(String firstName, String lastName)
    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
    Removes an existing client and all his reservations from the repository and notifies the view(s) about the changes.
    void
    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

      void deleteClient(Client client)
      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

      void deleteReservation(Reservation reservation)
      Removes an existing reservation from the repository and notifies the view(s) about the changes.
      Parameters:
      reservation - the reservation to delete.
    • addClient

      void addClient(String firstName, String lastName)
      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

      void addReservation(Client client, String date)
      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

      void renameClient(Client client, String newFirstName, String newLastName)
      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

      void rescheduleReservation(Reservation reservation, String newDate)
      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.