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 Summary
Modifier and TypeMethodDescriptioncreateAppointmentData
(String description, Duration duration) Factory method to create an AppointmentData object without specified startTime.default AppointmentRequest
createAppointmentRequest
(AppointmentData appData, TimePreference preference) Create a request with time preference.default AppointmentRequest
createAppointmentRequest
(AppointmentData data, LocalTime startTime) Create an appointmentRequest with a required start time.createAppointmentRequest
(AppointmentData appointmentData, LocalTime preferredStart, TimePreference fallBack) Create a request with a preferred start time and a fallback time preference.createLocalDayPlan
(LocalDay day, Instant start, Instant end) Factory method to create a day plan instance.default LocalDayPlan
createLocalDayPlan
(LocalDay day, LocalTime startTime, LocalTime endTime) Factory method to create a day plan instance.
-
Method Details
-
createLocalDayPlan
Factory method to create a day plan instance.- Parameters:
day
- local day of this planstartTime
- earliest time in planendTime
- no appointments end after this time- Returns:
- LocalDayPlan object.
-
createLocalDayPlan
Factory method to create a day plan instance.- Parameters:
day
- local day of this planstart
- earliest time in planend
- no appointments end after this time- Returns:
- LocalDayPlan object.
-
createAppointmentData
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 appointmentduration
- of the appointment- Returns:
- AppointmentData object.
- Throws:
NullPointerException
- if any of the parameters are null
-
createAppointmentRequest
Create an appointmentRequest with a required start time.- Parameters:
data
- of the requeststartTime
- 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 requestpreference
- 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 requestpreferredStart
- preferred start timefallBack
- when time not available, use fallback TimePreference- Returns:
- the request
-