Class SolrFormEntryIndexer

java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.indexing.solr.SolrFormEntryIndexer
All Implemented Interfaces:
SolrFieldNames, LogEnabled, SolrWebFieldNames, Component, Contextualizable, Serviceable

Component for FormEntry indexing into a Solr server.
  • Field Details

  • Constructor Details

  • Method Details

    • service

      public void service(ServiceManager manager) throws ServiceException
      Specified by:
      service in interface Serviceable
      Throws:
      ServiceException
    • contextualize

      public void contextualize(Context context) throws ContextException
      Specified by:
      contextualize in interface Contextualizable
      Throws:
      ContextException
    • indexFormEntry

      public void indexFormEntry(FormEntry entry, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, boolean waitForSolr) throws Exception
      Add or update a form entry into Solr index
      Parameters:
      entry - The form entry to index
      workspaceName - The workspace where to index
      solrClient - The solr client to use
      waitForSolr - true to wait a bit after indexing to let solr commit the document and make it available for search, false otherwise
      Throws:
      Exception - if an error occurs while indexing.
    • indexAllFormEntries

      public IndexationResult indexAllFormEntries(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient, SimpleProgressionTracker progressionTracker)
      Index all form entries into Solr index for a given workspace.
      Parameters:
      site - The site where to index. Can be null if all form entries should be indexed.
      workspaceName - The workspace where to index.
      solrClient - The solr client to use.
      progressionTracker - The progression tracker to update during the indexation.
      Returns:
      The result of the indexation.
    • unindexFormEntry

      public void unindexFormEntry(String entryId, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
      Unindex a form entry from Solr index.
      Parameters:
      entryId - The id of the form entry to unindex.
      workspaceName - The workspace where to unindex.
      solrClient - The solr client to use.
      Throws:
      Exception - if an error occurs while unindexing.
    • unindexAllFormEntries

      public void unindexAllFormEntries(Site site, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
      Unindex all form entries from Solr index for a given workspace.
      Parameters:
      site - The site where to unindex. Can be null if all form entries should be unindexed.
      workspaceName - The workspace where to unindex.
      solrClient - The solr client to use.
      Throws:
      Exception - if an error occurs while unindexing.
    • updateACL

      public void updateACL(List<FormEntry> entries, String workspaceName) throws Exception
      Update ACL for a list of form entries in the given workspace.
      Parameters:
      entries - The list of form entries to update ACL for.
      workspaceName - The workspace where to update ACL.
      Throws:
      Exception - if an error occurs while updating ACL.
    • updateWorkflowActors

      public void updateWorkflowActors(List<FormEntry> entries, String workspaceName, org.apache.solr.client.solrj.SolrClient solrClient) throws Exception
      Update workflow actors for a list of form entries in the given workspace.
      Parameters:
      entries - The list of form entries to update workflow actors for.
      workspaceName - The workspace where to update workflow actors.
      solrClient - The solr client to use.
      Throws:
      Exception - if an error occurs while updating workflow actors.