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 TypeMethodDescriptionvoid
contributeTrackable
(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, org.apache.solr.common.SolrInputDocument document) protected String
getCatalogId
(@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.TrackableBehavior
Methods inherited from class com.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor
canHandle, contributeInternal
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
-
CatalogTrackableSolrDocumentBuilderContributor
public CatalogTrackableSolrDocumentBuilderContributor()
-
-
Method Details
-
contributeTrackable
public void contributeTrackable(com.broadleafcommerce.search.api.domain.Indexable<?> indexable, org.apache.solr.common.SolrInputDocument document) - Specified by:
contributeTrackable
in 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:
getTrackableBehavior
in classcom.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor<org.apache.solr.common.SolrInputDocument>
-