Class 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 Detail

      • TrackableDocumentBuilderContributor

        public TrackableDocumentBuilderContributor()
    • Method Detail

      • 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