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
ConstructorsConstructorDescriptionFacetSearchEntityDeletedEventHandler(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 TypeMethodDescriptionprotected com.broadleafcommerce.data.tracking.core.context.ContextInfobuildContext(@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.ContextInfobuildHydratedContextInfo(@NonNull com.broadleafcommerce.data.tracking.core.context.ContextRequest dehydratedContextRequest) protected com.broadleafcommerce.data.tracking.core.context.ContextRequestbuildMatchingContextRequest(@NonNull com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) booleancanHandle(org.springframework.context.ApplicationEvent event) Whether the givenApplicationEventcan 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.ContextRequestHydratorprotected FacetGroupFacetService<com.broadleafcommerce.search.api.domain.FacetGroupFacet>protected FacetService<com.broadleafcommerce.search.api.domain.Facet>protected com.broadleafcommerce.common.extension.TypeFactoryvoidhandle(org.springframework.context.ApplicationEvent event) Handles theApplicationEventthat represents an event for a deleted entity.
-
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:SearchEntityDeletedEventHandlerWhether the givenApplicationEventcan be handled.- Specified by:
canHandlein interfaceSearchEntityDeletedEventHandler- Parameters:
event- theApplicationEventthat potentially represents an event for deleted entity- Returns:
- true if the given
ApplicationEventcan be handled, otherwise false
-
handle
public void handle(org.springframework.context.ApplicationEvent event) Description copied from interface:SearchEntityDeletedEventHandlerHandles theApplicationEventthat represents an event for a deleted entity.- Specified by:
handlein interfaceSearchEntityDeletedEventHandler- Parameters:
event- theApplicationEventthat 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
-
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()
-