Class TrackableDocumentBuilderContributor<T>

java.lang.Object
com.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor<T>
Type Parameters:
T - The type of the document being modified
All Implemented Interfaces:
com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<T>

public abstract class TrackableDocumentBuilderContributor<T> extends Object implements com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<T>
Supports contributing trackable information fields to the document.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
     
    void
    contributeInternal(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields)
     
    protected abstract void
    contributeTrackable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document)
     
    protected abstract com.broadleafcommerce.data.tracking.core.TrackableBehavior
    The TrackableBehavior for which the contributor should populate fields.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor

    contribute
  • Constructor Details

    • TrackableDocumentBuilderContributor

      public TrackableDocumentBuilderContributor()
  • Method Details

    • contributeInternal

      public void contributeInternal(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document, com.jayway.jsonpath.DocumentContext context, List<com.broadleafcommerce.search.api.domain.FieldDefinition> searchFields) throws com.broadleafcommerce.search.api.SearchIndexException
      Specified by:
      contributeInternal in interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<T>
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException
    • contributeTrackable

      protected abstract void contributeTrackable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, T document)
    • canHandle

      public boolean canHandle(com.broadleafcommerce.search.api.domain.Indexable<?> indexable)
      Specified by:
      canHandle in interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<T>
    • getTrackableBehavior

      protected abstract com.broadleafcommerce.data.tracking.core.TrackableBehavior getTrackableBehavior()
      The TrackableBehavior for which the contributor should populate fields.
      Returns:
      trackable behavior for which to populate fields