Class SolrAppointmentIndexer

  • All Implemented Interfaces:
    fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer

    public class SolrAppointmentIndexer
    extends java.lang.Object
    implements fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
    Indexer of the slots and forms of RDV V2
    Author:
    Laurent Payen
    • Field Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deleteFormAndListSlots​(int nIdForm, java.lang.StringBuilder sbLogs)
      Delete the Appointment Form and all the related slots in Solr
      void deleteSlot​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot, java.lang.StringBuilder sbLogs)
      Delete the slot in solr
      java.util.List<fr.paris.lutece.plugins.search.solr.business.field.Field> getAdditionalFields()  
      java.lang.String getDescription()  
      java.util.List<fr.paris.lutece.plugins.search.solr.indexer.SolrItem> getDocuments​(java.lang.String arg0)  
      java.lang.String getName()  
      java.util.List<java.lang.String> getResourcesName()  
      java.lang.String getResourceUid​(java.lang.String strResourceId, java.lang.String strResourceType)  
      java.lang.String getVersion()  
      java.util.List<java.lang.String> indexDocuments()  
      boolean isEnable()  
      void writeFormAndListSlots​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm)
      Write the Appointment Form and all the slots of this form to Solr
      void writeFormAndListSlots​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm, java.lang.StringBuilder sbLogs)
      Write the Appointment Form and all the related slots to Solr
      void writeSlotAndForm​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)
      Write / Update the slot and then the related form (for the number of available places) to Solr
      void writeSlotAndForm​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot, java.lang.StringBuilder sbLogs)
      Write / Update the slot and then the related form (for the number of available places) to Solr
      void writeSlotAndForm​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot, java.lang.StringBuilder sbLogs, java.util.Queue<fr.paris.lutece.plugins.appointment.business.slot.Slot> listSlotToIndex)
      Write / update the slot and the related form (for the number of available places) in solr
      • Methods inherited from class java.lang.Object

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

      • SolrAppointmentIndexer

        public SolrAppointmentIndexer()
    • Method Detail

      • indexDocuments

        public java.util.List<java.lang.String> indexDocuments()
        Specified by:
        indexDocuments in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getResourceUid

        public java.lang.String getResourceUid​(java.lang.String strResourceId,
                                               java.lang.String strResourceType)
        Specified by:
        getResourceUid in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getAdditionalFields

        public java.util.List<fr.paris.lutece.plugins.search.solr.business.field.Field> getAdditionalFields()
        Specified by:
        getAdditionalFields in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getDocuments

        public java.util.List<fr.paris.lutece.plugins.search.solr.indexer.SolrItem> getDocuments​(java.lang.String arg0)
        Specified by:
        getDocuments in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getResourcesName

        public java.util.List<java.lang.String> getResourcesName()
        Specified by:
        getResourcesName in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • getVersion

        public java.lang.String getVersion()
        Specified by:
        getVersion in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • isEnable

        public boolean isEnable()
        Specified by:
        isEnable in interface fr.paris.lutece.plugins.search.solr.indexer.SolrIndexer
      • writeFormAndListSlots

        public void writeFormAndListSlots​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm)
                                   throws java.io.IOException
        Write the Appointment Form and all the slots of this form to Solr
        Parameters:
        appointmentForm - the appointment form
        Throws:
        java.io.IOException
      • writeFormAndListSlots

        public void writeFormAndListSlots​(fr.paris.lutece.plugins.appointment.web.dto.AppointmentFormDTO appointmentForm,
                                          java.lang.StringBuilder sbLogs)
                                   throws java.io.IOException
        Write the Appointment Form and all the related slots to Solr
        Parameters:
        appointmentForm - the Appointment Form
        sbLogs - the logs
        Throws:
        java.io.IOException
      • writeSlotAndForm

        public void writeSlotAndForm​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot)
                              throws java.io.IOException
        Write / Update the slot and then the related form (for the number of available places) to Solr
        Parameters:
        nIdSlot - The id of the slot to write / update
        Throws:
        java.io.IOException
      • writeSlotAndForm

        public void writeSlotAndForm​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot,
                                     java.lang.StringBuilder sbLogs)
                              throws java.io.IOException
        Write / Update the slot and then the related form (for the number of available places) to Solr
        Parameters:
        nIdSlot - The id of the slot to write / update
        Throws:
        java.io.IOException
      • writeSlotAndForm

        public void writeSlotAndForm​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot,
                                     java.lang.StringBuilder sbLogs,
                                     java.util.Queue<fr.paris.lutece.plugins.appointment.business.slot.Slot> listSlotToIndex)
                              throws java.io.IOException
        Write / update the slot and the related form (for the number of available places) in solr
        Parameters:
        nIdSlot - The id of the slot
        sbLogs - the logs
        Throws:
        java.io.IOException
      • deleteFormAndListSlots

        public void deleteFormAndListSlots​(int nIdForm,
                                           java.lang.StringBuilder sbLogs)
                                    throws org.apache.solr.client.solrj.SolrServerException,
                                           java.io.IOException
        Delete the Appointment Form and all the related slots in Solr
        Parameters:
        nIdForm - The id of the Form
        sbLogs - the logs
        Throws:
        org.apache.solr.client.solrj.SolrServerException
        java.io.IOException
      • deleteSlot

        public void deleteSlot​(fr.paris.lutece.plugins.appointment.business.slot.Slot slot,
                               java.lang.StringBuilder sbLogs)
                        throws org.apache.solr.client.solrj.SolrServerException,
                               java.io.IOException
        Delete the slot in solr
        Parameters:
        slot - The slot to delete
        sbLogs - the logs
        Throws:
        org.apache.solr.client.solrj.SolrServerException
        java.io.IOException