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.
  • 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