Class SlotUtil
- java.lang.Object
-
- fr.paris.lutece.plugins.appointment.modules.solr.service.SlotUtil
-
public final class SlotUtil extends java.lang.ObjectUtils for the slots (Uid, Url, Item ...)- Author:
- Laurent Payen
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcalculateConsecutiveSlots(fr.paris.lutece.plugins.appointment.business.slot.Slot slot, java.util.List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots)static java.util.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, java.util.List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots)Build and return the slot Item for Solrstatic java.lang.StringgetSlotUid(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)Generate a unique ID for solr.static java.lang.StringgetSlotUrl(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)Get the slot url to call directly rdv v2 with the good parameters
-
-
-
Method Detail
-
getSlotUid
public static java.lang.String getSlotUid(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)
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
public static java.lang.String getSlotUrl(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)
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, java.util.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 java.util.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, java.util.List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots)
-
-