Class ObjectFacadeSolrIndexingAspect


  • public class ObjectFacadeSolrIndexingAspect
    extends java.lang.Object
    Contains logic of aspect responsible for updating solr index.
    Shall be called when Backoffice ObjectFacade performs changes on ItemModel. This class uses underlying SolrIndexSynchronizationStrategy to perform operations on 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
    • Constructor Detail

      • ObjectFacadeSolrIndexingAspect

        public ObjectFacadeSolrIndexingAspect()
    • Method Detail

      • updateChanged

        public void updateChanged​(org.aspectj.lang.JoinPoint joinPoint,
                                  java.lang.Object retVal)
        Logic to be called when item is being changed via ObjectFacade
        Parameters:
        joinPoint - aspect joint point
        retVal - 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 via ObjectFacade
        Parameters:
        joinPoint - aspect joint point
        retVal - 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)
      • getModifiedProductsPK

        protected java.util.List<PK> getModifiedProductsPK​(ItemModel model)
      • getLastModifiedProductsPK

        protected java.util.List<PK> getLastModifiedProductsPK​(CategoryModel model)
      • getCurrentDateMinusOneMinute

        protected java.util.Date getCurrentDateMinusOneMinute()
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setItemModificationHistoryService

        public void setItemModificationHistoryService​(ItemModificationHistoryService itemModificationHistoryService)
      • setConfigurationService

        public void setConfigurationService​(ConfigurationService configurationService)