public class AppointmentSlotService extends Object
| Constructor and Description |
|---|
AppointmentSlotService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkForDayModification(AppointmentDay day,
AppointmentDay dayFromDb,
AppointmentForm form)
Check if a day has changed its appointment duration or has been enabled
or disabled, and update slots to be compliant with new parameters of the
day.
|
boolean |
checkForFormModification(AppointmentForm appointmentForm,
AppointmentForm formFromDb)
Check if a form has changed its appointment duration or has enabled or
disabled a day of the week, and update slots to be compliant with new
parameters of the form.
|
void |
computeAndCreateSlotsForDay(AppointmentDay day,
AppointmentForm form)
Compute slots for a given day, and create them
|
void |
computeAndCreateSlotsForForm(AppointmentForm appointmentForm)
Compute slots for a given day, and create them
|
static AppointmentSlotService |
getInstance()
Get the instance of the service
|
void |
updateSlotsOfDayAfterSlotModification(AppointmentSlot modifiedSlot)
Update slots of a day or of a form after the modification of the ending
time of a given slot of this day or form
|
public static AppointmentSlotService getInstance()
public void computeAndCreateSlotsForDay(AppointmentDay day, AppointmentForm form)
day - The day to create slots of. The day must have been inserted in
the database.form - The form associated with the day.public void computeAndCreateSlotsForForm(AppointmentForm appointmentForm)
appointmentForm - The form to create slots of. The form must have
been inserted in the database.public void updateSlotsOfDayAfterSlotModification(AppointmentSlot modifiedSlot)
modifiedSlot - The modified slot with its new values.public boolean checkForDayModification(AppointmentDay day, AppointmentDay dayFromDb, AppointmentForm form)
day - The day with new values of attributes. New values should be
saved in the database before this method is called.dayFromDb - The day with old values of attributes.form - The form associated with the day.public boolean checkForFormModification(AppointmentForm appointmentForm, AppointmentForm formFromDb)
appointmentForm - The form with new values of attributes. New values
should be saved in the database before this method is called.formFromDb - The form with old values of attributes.Copyright © 2015 Mairie de Paris. All rights reserved.