Interface AbstractAPFactory


public interface AbstractAPFactory
This is the interface that the user (the teachers) of your implementation use to obtain instances of the classes implementing the given other interfaces. *
Author:
Pieter van den Hombergh p.vandenhombergh@fontys.nl
  • Method Details

    • createLocalDayPlan

      default LocalDayPlan createLocalDayPlan(LocalDay day, LocalTime startTime, LocalTime endTime)
      Factory method to create a day plan instance.
      Parameters:
      day - local day of this plan
      startTime - earliest time in plan
      endTime - no appointments end after this time
      Returns:
      LocalDayPlan object.
    • createLocalDayPlan

      LocalDayPlan createLocalDayPlan(LocalDay day, Instant start, Instant end)
      Factory method to create a day plan instance.
      Parameters:
      day - local day of this plan
      start - earliest time in plan
      end - no appointments end after this time
      Returns:
      LocalDayPlan object.
    • createAppointmentData

      AppointmentData createAppointmentData(String description, Duration duration)
      Factory method to create an AppointmentData object without specified startTime. The start time will be set (in an Appointment) as soon as the appointment is added to the Day schedule.
      Parameters:
      description - of the appointment
      duration - of the appointment
      Returns:
      AppointmentData object.
      Throws:
      NullPointerException - if any of the parameters are null
    • createAppointmentRequest

      default AppointmentRequest createAppointmentRequest(AppointmentData data, LocalTime startTime)
      Create an appointmentRequest with a required start time.
      Parameters:
      data - of the request
      startTime - time of the request
      Returns:
      the request.
    • createAppointmentRequest

      default AppointmentRequest createAppointmentRequest(AppointmentData appData, TimePreference preference)
      Create a request with time preference.
      Parameters:
      appData - for this request
      preference - for time, early or late
      Returns:
      the request
    • createAppointmentRequest

      AppointmentRequest createAppointmentRequest(AppointmentData appointmentData, LocalTime preferredStart, TimePreference fallBack)
      Create a request with a preferred start time and a fallback time preference.
      Parameters:
      appointmentData - data of the request
      preferredStart - preferred start time
      fallBack - when time not available, use fallback TimePreference
      Returns:
      the request
    • between

      TimeSlot between(Instant start, Instant end)
      Create a time slot between two times.
      Parameters:
      start - date+time
      end - date+time
      Returns:
      the time slot
    • between

      default TimeSlot between(LocalDay day, LocalTime startTime, LocalTime endTime)
      Compute time slot on a date between given start- and endTime. If endTime is less than or equal to start time, it is assumed that the end time is on the next day.
      Parameters:
      day - local day with time zone and date
      startTime - start time
      endTime - end time
      Returns:
      the timeslot