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 Summary
Modifier and TypeMethodDescriptiondefault TimeSlot
Compute time slot on a date between given start- and endTime.Create a time slot between two times.createAppointmentData
(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
-
between
Create a time slot between two times.- Parameters:
start
- date+timeend
- date+time- Returns:
- the time slot
-
between
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 datestartTime
- start timeendTime
- end time- Returns:
- the timeslot
-