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 Constructor Description CatalogTrackableSolrDocumentBuilderContributor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
getTrackableBehavior()
-
Methods inherited from class com.broadleafcommerce.search.index.common.document.TrackableDocumentBuilderContributor
canHandle, contributeInternal
-
-
-
-
Method Detail
-
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>
-
-