public final class SlotSafeService extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
cleanSlotlist()
Clean slotlist
|
static Slot |
createSlot(Slot slot)
Create slot
|
static void |
decrementPotentialRemainingPlaces(int nbPotentialRemainingPlaces,
int nIdSlot)
Update potential remaining places
|
static Map<Integer,Lock> |
getListSlotInMemory()
Get the slot in memory
|
static Lock |
getLockOnSlot(int nIdSlot)
get lock for slot
|
static void |
incrementMaxCapacity(int nIdForm,
int nIncrementingValue,
LocalDateTime startindDateTime,
LocalDateTime endingDateTime,
boolean lace)
Increment max capacity
|
static Slot |
incrementPotentialRemainingPlaces(SlotEditTask task)
Update potential remaining places
|
static void |
removeSlotInMemory(int nIdSlot)
remove slot in map memory
|
static int |
saveAppointment(AppointmentDTO appointmentDTO,
javax.servlet.http.HttpServletRequest request)
Save a slot in database
|
static Slot |
saveSlot(Slot slot)
Save a slot in database
|
static void |
updateRemainingPlaces(Slot slot)
Update the capacity of the slot
|
static Slot |
updateSlot(Slot slot)
Update a slot
|
static void |
updateSlot(Slot slot,
boolean bEndingTimeHasChanged,
LocalTime previousEndingTime,
boolean bShifSlot)
Update a slot in database and possibly all the slots after (if the ending hour has changed, all the next slots are impacted in case of the user decide to
shift the next slots)
|
public static Map<Integer,Lock> getListSlotInMemory()
public static Lock getLockOnSlot(int nIdSlot)
nIdSlot - the Id Slotpublic static void removeSlotInMemory(int nIdSlot)
nIdSlot - the Id Slotpublic static void incrementMaxCapacity(int nIdForm,
int nIncrementingValue,
LocalDateTime startindDateTime,
LocalDateTime endingDateTime,
boolean lace)
nIdForm - the Id formnIncrementingValue - the incrementing valuestartindDateTime - the starting date TimeendingDateTime - the ending Date timelace - the lacepublic static Slot incrementPotentialRemainingPlaces(SlotEditTask task)
task - the task timerpublic static void decrementPotentialRemainingPlaces(int nbPotentialRemainingPlaces,
int nIdSlot)
nbPotentialRemainingPlaces - the nbPotentialRemainingPlacesnIdSlot - the is Slotpublic static int saveAppointment(AppointmentDTO appointmentDTO, javax.servlet.http.HttpServletRequest request)
slot - the slot to savepublic static void updateSlot(Slot slot, boolean bEndingTimeHasChanged, LocalTime previousEndingTime, boolean bShifSlot)
slot - the slot to updatebEndingTimeHasChanged - true if the ending time has changedpreviousEndingTime - the previous ending timebShifSlot - true if the user has decided to shift the next slotspublic static void updateRemainingPlaces(Slot slot)
slot - the slot to updatepublic static Slot saveSlot(Slot slot)
slot - the slot to savepublic static Slot updateSlot(Slot slot)
slot - the slot updatedpublic static void cleanSlotlist()
Copyright © 2023 City of Paris. All rights reserved.