Class FacetSearchEntityDeletedEventHandler

java.lang.Object
com.broadleafcommerce.search.core.messaging.entitydeletion.handlers.FacetSearchEntityDeletedEventHandler
All Implemented Interfaces:
SearchEntityDeletedEventHandler

public class FacetSearchEntityDeletedEventHandler extends Object implements SearchEntityDeletedEventHandler
The SearchEntityDeletedEventHandler instance to clean up Facets when a JpaFieldDefinition is deleted.
Since:
Search Service 2.1.4, Release Train 2.1.4, Search Service 2.2.0, Release Train 2.2.0
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Summary

    Constructors
    Constructor
    Description
    FacetSearchEntityDeletedEventHandler(FacetService<com.broadleafcommerce.search.api.domain.Facet> facetService, FacetGroupFacetService<com.broadleafcommerce.search.api.domain.FacetGroupFacet> facetGroupFacetService, com.broadleafcommerce.data.tracking.core.web.ContextRequestHydrator contextRequestHydrator, com.broadleafcommerce.data.tracking.core.tenant.service.CommonCatalogService<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> catalogService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.broadleafcommerce.data.tracking.core.context.ContextInfo
    buildContext(@NonNull com.broadleafcommerce.data.tracking.core.type.OperationType operationType, @NonNull com.broadleafcommerce.data.tracking.core.context.ContextRequest contextRequest)
     
    protected com.broadleafcommerce.data.tracking.core.context.ContextInfo
    buildHydratedContextInfo(@NonNull com.broadleafcommerce.data.tracking.core.context.ContextRequest dehydratedContextRequest)
     
    protected com.broadleafcommerce.data.tracking.core.context.ContextRequest
    buildMatchingContextRequest(@NonNull com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
     
    boolean
    canHandle(org.springframework.context.ApplicationEvent event)
    Whether the given ApplicationEvent can be handled.
    protected com.broadleafcommerce.data.tracking.core.tenant.service.CommonCatalogService<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog>
     
    protected com.broadleafcommerce.data.tracking.core.web.ContextRequestHydrator
     
    protected FacetGroupFacetService<com.broadleafcommerce.search.api.domain.FacetGroupFacet>
     
    protected FacetService<com.broadleafcommerce.search.api.domain.Facet>
     
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    void
    handle(org.springframework.context.ApplicationEvent event)
    Handles the ApplicationEvent that represents an event for a deleted entity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FacetSearchEntityDeletedEventHandler

      public FacetSearchEntityDeletedEventHandler(FacetService<com.broadleafcommerce.search.api.domain.Facet> facetService, FacetGroupFacetService<com.broadleafcommerce.search.api.domain.FacetGroupFacet> facetGroupFacetService, com.broadleafcommerce.data.tracking.core.web.ContextRequestHydrator contextRequestHydrator, com.broadleafcommerce.data.tracking.core.tenant.service.CommonCatalogService<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> catalogService, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • canHandle

      public boolean canHandle(org.springframework.context.ApplicationEvent event)
      Description copied from interface: SearchEntityDeletedEventHandler
      Whether the given ApplicationEvent can be handled.
      Specified by:
      canHandle in interface SearchEntityDeletedEventHandler
      Parameters:
      event - the ApplicationEvent that potentially represents an event for deleted entity
      Returns:
      true if the given ApplicationEvent can be handled, otherwise false
    • handle

      public void handle(org.springframework.context.ApplicationEvent event)
      Description copied from interface: SearchEntityDeletedEventHandler
      Handles the ApplicationEvent that represents an event for a deleted entity.
      Specified by:
      handle in interface SearchEntityDeletedEventHandler
      Parameters:
      event - the ApplicationEvent that potentially represents an event for deleted entity
    • buildMatchingContextRequest

      protected com.broadleafcommerce.data.tracking.core.context.ContextRequest buildMatchingContextRequest(@NonNull @NonNull com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
    • buildHydratedContextInfo

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildHydratedContextInfo(@NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextRequest dehydratedContextRequest)
    • buildContext

      protected com.broadleafcommerce.data.tracking.core.context.ContextInfo buildContext(@NonNull @NonNull com.broadleafcommerce.data.tracking.core.type.OperationType operationType, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextRequest contextRequest)
    • getFacetService

      protected FacetService<com.broadleafcommerce.search.api.domain.Facet> getFacetService()
    • getFacetGroupFacetService

      protected FacetGroupFacetService<com.broadleafcommerce.search.api.domain.FacetGroupFacet> getFacetGroupFacetService()
    • getContextRequestHydrator

      protected com.broadleafcommerce.data.tracking.core.web.ContextRequestHydrator getContextRequestHydrator()
    • getCatalogService

      protected com.broadleafcommerce.data.tracking.core.tenant.service.CommonCatalogService<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> getCatalogService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()