Class AbstractDocumentBuilderPreProcessor

java.lang.Object
com.broadleafcommerce.search.index.core.document.AbstractDocumentBuilderPreProcessor
All Implemented Interfaces:
DocumentBuilderPreProcessor

public abstract class AbstractDocumentBuilderPreProcessor extends Object implements DocumentBuilderPreProcessor
Abstract processor for updating indexables sharing the same contextId. Provides the convenience of checking that some indexables should be processed before performing the internal processing.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    preProcess(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
    Process a collection of indexables sharing the same contextId with information which depends on the context of the other indexables.
    protected abstract void
    preProcessInternal(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
    Process a collection of indexables sharing the same contextId with information which depends on the context of the other indexables.
    protected abstract boolean
    shouldProcess(com.broadleafcommerce.search.api.domain.Indexable<?> sampleIndexable)
    Determine if this processor should be processed on the group containing this indexable.
    protected boolean
    shouldProcess(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
    Determine if these indexables should be processed here based on information about a single indexable in the group.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractDocumentBuilderPreProcessor

      public AbstractDocumentBuilderPreProcessor()
  • Method Details

    • preProcess

      public void preProcess(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
      Description copied from interface: DocumentBuilderPreProcessor
      Process a collection of indexables sharing the same contextId with information which depends on the context of the other indexables.
      Specified by:
      preProcess in interface DocumentBuilderPreProcessor
      Parameters:
      indexables - The indexables to process
    • preProcessInternal

      protected abstract void preProcessInternal(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
      Process a collection of indexables sharing the same contextId with information which depends on the context of the other indexables.
      Parameters:
      indexables - The indexables to process
    • shouldProcess

      protected boolean shouldProcess(List<? extends com.broadleafcommerce.search.api.domain.Indexable<?>> indexables)
      Determine if these indexables should be processed here based on information about a single indexable in the group.
      Parameters:
      indexables - The indexables to process
      Returns:
      whether or not to process the indexables based on a single indexable in the group
    • shouldProcess

      protected abstract boolean shouldProcess(com.broadleafcommerce.search.api.domain.Indexable<?> sampleIndexable)
      Determine if this processor should be processed on the group containing this indexable.
      Parameters:
      sampleIndexable - a single indexable from the group to be processed
      Returns:
      whether or not this indexable's group should be processed