Class SlotUtil


  • public final class SlotUtil
    extends java.lang.Object
    Utils for the slots (Uid, Url, Item ...)
    Author:
    Laurent Payen
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int calculateConsecutiveSlots​(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 RDV
      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
      static java.lang.String getSlotUid​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)
      Generate a unique ID for solr.
      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
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 Form
        slot - 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)