Class SlotUtil
java.lang.Object
fr.paris.lutece.plugins.appointment.modules.solr.service.SlotUtil
Utils for the slots (Uid, Url, Item ...)
- Author:
- Laurent Payen
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateConsecutiveSlots(fr.paris.lutece.plugins.appointment.business.slot.Slot slot, List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots) static List<fr.paris.lutece.plugins.appointment.business.slot.Slot>getAllSlots(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm) Get all the slots of a form by calling the method buildListSlot of the plugin RDVstatic fr.paris.lutece.plugins.search.solr.indexer.SolrItemgetSlotItem(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm, fr.paris.lutece.plugins.appointment.business.slot.Slot slot, List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots) Build and return the slot Item for Solrstatic StringgetSlotUid(fr.paris.lutece.plugins.appointment.business.slot.Slot slot) Generate a unique ID for solr.static StringgetSlotUrl(fr.paris.lutece.plugins.appointment.business.slot.Slot slot) Get the slot url to call directly rdv v2 with the good parameters
-
Method Details
-
getSlotUid
Generate a unique ID for solr. Slots don't have ids anymore, so we use the form_id and the slot date as an ID. We try to make a "readable" id with the form id and the slot datetime, using only alphanumerical caracters to avoid potential problems with code parsing this ID. -
getSlotUrl
Get the slot url to call directly rdv v2 with the good parameters- Parameters:
slot- the slot- Returns:
- the url with all the parameters
-
getSlotItem
public static fr.paris.lutece.plugins.search.solr.indexer.SolrItem getSlotItem(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm, fr.paris.lutece.plugins.appointment.business.slot.Slot slot, List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots) Build and return the slot Item for Solr- Parameters:
appointmentForm- the Appointment Formslot- the slot- Returns:
- the slot Item
-
getAllSlots
public static List<fr.paris.lutece.plugins.appointment.business.slot.Slot> getAllSlots(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm) Get all the slots of a form by calling the method buildListSlot of the plugin RDV- Parameters:
appointmentForm- the appointment form- Returns:
- all the slots of a form
-
calculateConsecutiveSlots
public static int calculateConsecutiveSlots(fr.paris.lutece.plugins.appointment.business.slot.Slot slot, List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots)
-