java.lang.Object
fr.paris.lutece.plugins.appointment.modules.solr.service.SlotUtil

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

    Modifier and Type
    Method
    Description
    static int
    calculateConsecutiveSlots(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 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, List<fr.paris.lutece.plugins.appointment.business.slot.Slot> allSlots)
    Build and return the slot Item for Solr
    static String
    getSlotUid(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)
    Generate a unique ID for solr.
    static 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 Details

    • getSlotUid

      public static 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 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, 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 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)