Class CatalogTrackableSolrDocumentBuilderContributor
java.lang.Object
com.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
com.broadleafcommerce.search.index.solr.document.CatalogTrackableSolrDocumentBuilderContributor
- All Implemented Interfaces:
com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
public class CatalogTrackableSolrDocumentBuilderContributor
extends com.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
Contribute fields to the document for tracking its Catalog context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontributeTrackable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, org.apache.solr.common.SolrInputDocument document) protected StringgetCatalogId(@NonNull com.broadleafcommerce.search.api.domain.CatalogTrackable catalogTrackable) Return the catalog ID to be set on this catalog trackable document.protected com.broadleafcommerce.data.tracking.core.TrackableBehaviorMethods inherited from class com.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor
canHandle, contributeInternalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.search.index.core.document.DocumentBuilderContributor
contribute
-
Constructor Details
-
CatalogTrackableSolrDocumentBuilderContributor
public CatalogTrackableSolrDocumentBuilderContributor()
-
-
Method Details
-
contributeTrackable
public void contributeTrackable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, org.apache.solr.common.SolrInputDocument document) - Specified by:
contributeTrackablein classcom.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
-
getCatalogId
protected String getCatalogId(@NonNull @NonNull com.broadleafcommerce.search.api.domain.CatalogTrackable catalogTrackable) Return the catalog ID to be set on this catalog trackable document. IfContextState.getOverrideCatalogId()is not empty, this is an overridden catalog trackable, and that value is returned. Otherwise,ContextState.getBaseCatalogId()is returned.- Parameters:
catalogTrackable- The catalog trackable.- Returns:
- The catalog ID of the indexable.
-
getTrackableBehavior
protected com.broadleafcommerce.data.tracking.core.TrackableBehavior getTrackableBehavior()- Specified by:
getTrackableBehaviorin classcom.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
-