@Service(value="blMultiTenantWorkflowSolrIndexServiceExtensionHandler")
public class MultiTenantWorkflowSolrIndexServiceExtensionHandler
extends com.broadleafcommerce.enterprise.common.extension.search.AbstractWorkflowSolrIndexServiceExtensionHandler
implements com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionHandler
| Modifier and Type | Field and Description |
|---|---|
protected com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionManager |
extensionManager |
protected org.broadleafcommerce.core.search.service.solr.index.SolrIndexService |
indexService |
protected MultiTenantProductDao |
mtProductDao |
protected org.broadleafcommerce.core.catalog.dao.ProductDao |
productDao |
protected org.broadleafcommerce.common.sandbox.SandBoxHelper |
sandBoxHelper |
protected org.broadleafcommerce.core.search.service.solr.SolrHelperService |
shs |
protected org.broadleafcommerce.common.site.service.SiteService |
siteService |
protected MultiTenantSiteUtil |
siteUtil |
protected org.broadleafcommerce.core.search.service.solr.SolrConfiguration |
solrConfiguration |
protected com.broadleafcommerce.enterprise.workflow.persistence.WorkflowStateManager |
workflowStateManager |
| Constructor and Description |
|---|
MultiTenantWorkflowSolrIndexServiceExtensionHandler() |
| Modifier and Type | Method and Description |
|---|---|
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
attachAdditionalDeleteDocumentFields(org.broadleafcommerce.core.catalog.domain.Indexable indexable,
org.apache.solr.common.SolrInputDocument doc) |
protected void |
attachDeleteDocumentCatalogFields(CatalogDiscriminator catalogItem,
org.apache.solr.common.SolrInputDocument doc) |
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
buildAdditionalDeploymentDocuments(List<Long> indexableIds,
List<? extends org.broadleafcommerce.core.catalog.domain.Indexable> indexables,
List<org.apache.solr.common.SolrInputDocument> builtDocs)
This will build the super-catalog document.
|
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
getAdditionalDeleteQueryClause(org.broadleafcommerce.common.extension.ExtensionResultHolder<String> erh) |
protected List<CatalogDerivedCatalogXref> |
getSyncedCopyCatalogs() |
void |
init() |
org.broadleafcommerce.common.extension.ExtensionResultStatusType |
isCurrentSiteIndexable(org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> holder) |
protected boolean |
isSyncedCopyCatalog(org.broadleafcommerce.common.site.domain.Catalog catalog,
List<CatalogDerivedCatalogXref> syncedCopyCatalogs)
Iterate through the given List
|
getPriority, isEnabled, setEnabled, setPriorityprotected com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionManager extensionManager
protected MultiTenantProductDao mtProductDao
protected org.broadleafcommerce.core.search.service.solr.SolrHelperService shs
protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
protected org.broadleafcommerce.core.search.service.solr.index.SolrIndexService indexService
@Qualifier(value="blCatalogSolrConfiguration") @Autowired(required=false) protected org.broadleafcommerce.core.search.service.solr.SolrConfiguration solrConfiguration
protected org.broadleafcommerce.common.site.service.SiteService siteService
protected com.broadleafcommerce.enterprise.workflow.persistence.WorkflowStateManager workflowStateManager
protected org.broadleafcommerce.core.catalog.dao.ProductDao productDao
protected MultiTenantSiteUtil siteUtil
public MultiTenantWorkflowSolrIndexServiceExtensionHandler()
@PostConstruct public void init()
public org.broadleafcommerce.common.extension.ExtensionResultStatusType getAdditionalDeleteQueryClause(org.broadleafcommerce.common.extension.ExtensionResultHolder<String> erh)
getAdditionalDeleteQueryClause in interface com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionHandlergetAdditionalDeleteQueryClause in class com.broadleafcommerce.enterprise.common.extension.search.AbstractWorkflowSolrIndexServiceExtensionHandlerpublic org.broadleafcommerce.common.extension.ExtensionResultStatusType attachAdditionalDeleteDocumentFields(org.broadleafcommerce.core.catalog.domain.Indexable indexable,
org.apache.solr.common.SolrInputDocument doc)
attachAdditionalDeleteDocumentFields in interface com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionHandlerattachAdditionalDeleteDocumentFields in class com.broadleafcommerce.enterprise.common.extension.search.AbstractWorkflowSolrIndexServiceExtensionHandlerprotected void attachDeleteDocumentCatalogFields(CatalogDiscriminator catalogItem, org.apache.solr.common.SolrInputDocument doc)
public org.broadleafcommerce.common.extension.ExtensionResultStatusType buildAdditionalDeploymentDocuments(List<Long> indexableIds, List<? extends org.broadleafcommerce.core.catalog.domain.Indexable> indexables, List<org.apache.solr.common.SolrInputDocument> builtDocs) throws org.broadleafcommerce.common.exception.ServiceException
This will build the super-catalog document. At this point since all the filters are enabled in the normal buildDocument flow kicked off from Enterprise, the only document that got built was the one for the child catalog (in a hierarchical catalog structure). We have to rebuild the parent catalog item because we need to attach an overriddenCatalogIds to it
At the time of writing, the given indexableIds returns the master catalog product IDs. We should be able to
read the actual catalog item from that ID and then build the document for that master catalog item. In the process
of building the master catalog item the overriddenCatalogs field is added via
MultiTenantSolrIndexServiceExtensionHandler.attachAdditionalBasicFields(Indexable, SolrInputDocument, SolrHelperService).
buildAdditionalDeploymentDocuments in interface com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionHandlerbuildAdditionalDeploymentDocuments in class com.broadleafcommerce.enterprise.common.extension.search.AbstractWorkflowSolrIndexServiceExtensionHandlerorg.broadleafcommerce.common.exception.ServiceExceptionprotected boolean isSyncedCopyCatalog(org.broadleafcommerce.common.site.domain.Catalog catalog,
List<CatalogDerivedCatalogXref> syncedCopyCatalogs)
catalog - the catalog we are deriving fromsyncedCopyCatalogs - the List of derived from catalogsprotected List<CatalogDerivedCatalogXref> getSyncedCopyCatalogs()
public org.broadleafcommerce.common.extension.ExtensionResultStatusType isCurrentSiteIndexable(org.broadleafcommerce.common.extension.ExtensionResultHolder<Boolean> holder)
isCurrentSiteIndexable in interface com.broadleafcommerce.enterprise.common.extension.search.WorkflowSolrIndexServiceExtensionHandlerisCurrentSiteIndexable in class com.broadleafcommerce.enterprise.common.extension.search.AbstractWorkflowSolrIndexServiceExtensionHandlerCopyright © 2020. All rights reserved.