Class FormUtil


  • public final class FormUtil
    extends java.lang.Object
    Utils for the Appointment Form (Item, Url, Uid ...)
    Author:
    Laurent Payen
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PARAMETER_ID_FORM  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static fr.paris.lutece.plugins.search.solr.indexer.SolrItem getDefaultFormItem​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm)
      Build and return the default form item for Solr
      static fr.paris.lutece.plugins.search.solr.indexer.SolrItem getFormItem​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm, java.util.List<fr.paris.lutece.plugins.appointment.business.slot.Slot> listSlots)
      Build and return the Form Item for Solr
      static java.lang.String getFormUid​(int nIdForm)
      Get the form Uid
      static java.lang.String getFormUrl​(int nIdForm)
      Get the form url
      static boolean isPeriodValidToIndex​(int nIdForm, java.time.LocalDate stratingDate, java.time.LocalDate endingDate)
      check if the period between the startingDate and endingDate is displayed on the calendar FO
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PARAMETER_ID_FORM

        public static final java.lang.String PARAMETER_ID_FORM
        See Also:
        Constant Field Values
    • Method Detail

      • getFormUid

        public static java.lang.String getFormUid​(int nIdForm)
        Get the form Uid
        Parameters:
        nIdForm - the form id
        Returns:
        the form Uid
      • getFormUrl

        public static java.lang.String getFormUrl​(int nIdForm)
        Get the form url
        Parameters:
        nIdForm - the form id
        Returns:
        the form url
      • getDefaultFormItem

        public static fr.paris.lutece.plugins.search.solr.indexer.SolrItem getDefaultFormItem​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm)
        Build and return the default form item for Solr
        Parameters:
        appointmentForm - the appointment form
        Returns:
        the form item
      • getFormItem

        public static fr.paris.lutece.plugins.search.solr.indexer.SolrItem getFormItem​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm,
                                                                                       java.util.List<fr.paris.lutece.plugins.appointment.business.slot.Slot> listSlots)
        Build and return the Form Item for Solr
        Parameters:
        appointmentForm - the Appointment Form
        listSlots - the list of the slots of the form
        Returns:
        the Form Item
      • isPeriodValidToIndex

        public static boolean isPeriodValidToIndex​(int nIdForm,
                                                   java.time.LocalDate stratingDate,
                                                   java.time.LocalDate endingDate)
        check if the period between the startingDate and endingDate is displayed on the calendar FO
        Parameters:
        nIdForm - the form
        stratingDate - the starting period
        endingDate - the ending period
        Returns:
        true if the period between the startingDate and endingDate is displayed on the calendar FO