Interface AppointmentRequest


public interface AppointmentRequest
Class holding the full details of an appointment request. Note that an appointment request is NOT an appointment but only an expression of intent! The AppointmentRequest is not input for the external API, but it is returned when removing Appointment(s). The idea is that, based on the AppointmentRequest of the removed Appointment, the appointment could be rescheduled. The AppointmentRequest is mainly used internally in the TimeLine, when an actual appointment is created. The AppointmentRequest holds LocalTime startTime, AppointmentData and TimePreference. Normally, either startTime or TimePreference is not null. If no TimePreference is set, it defaults to TimePreference.UNSPECIFIED. An AppointmentRequest with no startTime defined and with TimePreference UNSPECIFIED means that the invoker does not have any preference regarding time. It's up to the addAppointment method to decide how to deal with such a request.
Author:
Pieter van den Hombergh, Richard van den Ham
  • Method Details

    • start

      default Instant start(LocalDay onDay)
      Get the start time of the intended appointment. If the time is not specified, this method may return null.
      Parameters:
      onDay - the LocalDay the time is on.
      Returns:
      the start time as instant, potentially null.
    • startTime

      LocalTime startTime()
      Get the requested local start time.
      Returns:
      the start time
    • appointmentData

      AppointmentData appointmentData()
      Get the appointment details of this appointment.
      Returns:
      the data
    • timePreference

      default TimePreference timePreference()
      Time preference given with this appointment request. The default is TimePreference.UNSPECIFIED.
      Returns:
      the time preference
    • duration

      default Duration duration()
      Get the duration of the appointment request.
      Returns:
      the duration of the request