Class ObjectFacadeSolrIndexingAspect
- java.lang.Object
-
- com.hybris.backoffice.solrsearch.aspects.ObjectFacadeSolrIndexingAspect
-
public class ObjectFacadeSolrIndexingAspect extends java.lang.ObjectContains logic of aspect responsible for updating solr index.
Shall be called when BackofficeObjectFacadeperforms changes onItemModel. This class uses underlyingSolrIndexSynchronizationStrategyto perform operations on solr index.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_BACKOFFICE_SEARCH_BACKGROUND_SOLR_INDEXING_ENABLEDDetermines if solr indexing triggered for every indexed model change will be performed in non blocking operation - default: falsestatic java.lang.StringCONFIG_BACKOFFICE_SEARCH_REVERSE_CATEGORY_INDEX_LOOKUP_ENABLEDIn case when backoffice.search.reverse.category.index.lookup.enabled is set to true backoffice changes its behaviour for category-based search using explorer tree in product and assortment view.
-
Constructor Summary
Constructors Constructor Description ObjectFacadeSolrIndexingAspect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecuteIndexer(java.lang.Runnable runnable)protected java.util.Map<java.lang.String,java.util.List<PK>>extractModelsFromArgs(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)protected java.util.Optional<java.util.Set<PK>>extractProductsFromModifiedCategories(java.lang.Object model)protected java.util.Set<PK>findAllProductsInSubTree(CategoryModel cat)protected PoolableThreadfindBackgroundThread()protected ConfigurationServicegetConfigurationService()protected java.util.DategetCurrentDateMinusOneMinute()protected ItemModificationHistoryServicegetItemModificationHistoryService()protected java.util.List<PK>getLastModifiedProductsPK(CategoryModel model)protected java.util.Optional<SavedValueEntryModel>getLastSavedValuesForProducts(CategoryModel model)protected ModelServicegetModelService()protected java.util.List<PK>getModifiedProductsPK(ItemModel model)protected java.util.Set<PK>getProductPKsInCategory(CategoryModel cat)protected SolrIndexSynchronizationStrategygetSolrIndexSynchronizationStrategy()protected voidincludeRequiredProducts(org.aspectj.lang.JoinPoint joinPoint, java.util.Map<java.lang.String,java.util.List<PK>> result)protected booleanisBackgroundIndexingEnabled()protected booleanisReverseCategoryIndexLookupEnabled()voidsetConfigurationService(ConfigurationService configurationService)voidsetItemModificationHistoryService(ItemModificationHistoryService itemModificationHistoryService)voidsetModelService(ModelService modelService)voidsetSolrIndexSynchronizationStrategy(SolrIndexSynchronizationStrategy solrIndexSynchronizationStrategy)voidupdateChanged(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)Logic to be called when item is being changed viaObjectFacadevoidupdateRemoved(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)Logic to be called when item is being removed viaObjectFacadevoidupdateRemovedForMethodParameter(org.aspectj.lang.JoinPoint joinPoint)Removes method param item from solr index
-
-
-
Field Detail
-
CONFIG_BACKOFFICE_SEARCH_REVERSE_CATEGORY_INDEX_LOOKUP_ENABLED
public static final java.lang.String CONFIG_BACKOFFICE_SEARCH_REVERSE_CATEGORY_INDEX_LOOKUP_ENABLED
In case when backoffice.search.reverse.category.index.lookup.enabled is set to true backoffice changes its behaviour for category-based search using explorer tree in product and assortment view. Standard behaviour (the setting set to false, which is the default) each time the user selects a category its sub-tree is sent to solr to perform search using all passed categories- See Also:
- Constant Field Values
-
CONFIG_BACKOFFICE_SEARCH_BACKGROUND_SOLR_INDEXING_ENABLED
public static final java.lang.String CONFIG_BACKOFFICE_SEARCH_BACKGROUND_SOLR_INDEXING_ENABLED
Determines if solr indexing triggered for every indexed model change will be performed in non blocking operation - default: false- See Also:
- Constant Field Values
-
-
Method Detail
-
updateChanged
public void updateChanged(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)Logic to be called when item is being changed viaObjectFacade- Parameters:
joinPoint- aspect joint pointretVal- aspect returned value
-
updateRemoved
public void updateRemoved(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)Logic to be called when item is being removed viaObjectFacade- Parameters:
joinPoint- aspect joint pointretVal- aspect returned value
-
updateRemovedForMethodParameter
public void updateRemovedForMethodParameter(org.aspectj.lang.JoinPoint joinPoint)
Removes method param item from solr index- Parameters:
joinPoint- aspect joint point
-
executeIndexer
protected void executeIndexer(java.lang.Runnable runnable)
-
findBackgroundThread
protected PoolableThread findBackgroundThread()
-
extractModelsFromArgs
protected java.util.Map<java.lang.String,java.util.List<PK>> extractModelsFromArgs(org.aspectj.lang.JoinPoint joinPoint, java.lang.Object retVal)
-
includeRequiredProducts
protected void includeRequiredProducts(org.aspectj.lang.JoinPoint joinPoint, java.util.Map<java.lang.String,java.util.List<PK>> result)
-
isBackgroundIndexingEnabled
protected boolean isBackgroundIndexingEnabled()
-
isReverseCategoryIndexLookupEnabled
protected boolean isReverseCategoryIndexLookupEnabled()
-
extractProductsFromModifiedCategories
protected java.util.Optional<java.util.Set<PK>> extractProductsFromModifiedCategories(java.lang.Object model)
-
findAllProductsInSubTree
protected java.util.Set<PK> findAllProductsInSubTree(CategoryModel cat)
-
getProductPKsInCategory
protected java.util.Set<PK> getProductPKsInCategory(CategoryModel cat)
-
getLastModifiedProductsPK
protected java.util.List<PK> getLastModifiedProductsPK(CategoryModel model)
-
getLastSavedValuesForProducts
protected java.util.Optional<SavedValueEntryModel> getLastSavedValuesForProducts(CategoryModel model)
-
getCurrentDateMinusOneMinute
protected java.util.Date getCurrentDateMinusOneMinute()
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getSolrIndexSynchronizationStrategy
protected SolrIndexSynchronizationStrategy getSolrIndexSynchronizationStrategy()
-
setSolrIndexSynchronizationStrategy
public void setSolrIndexSynchronizationStrategy(SolrIndexSynchronizationStrategy solrIndexSynchronizationStrategy)
-
getItemModificationHistoryService
protected ItemModificationHistoryService getItemModificationHistoryService()
-
setItemModificationHistoryService
public void setItemModificationHistoryService(ItemModificationHistoryService itemModificationHistoryService)
-
getConfigurationService
protected ConfigurationService getConfigurationService()
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
-
-