Class CatalogEntityDeleteEventHandler
java.lang.Object
com.broadleafcommerce.recommendationengine.service.messaging.handlers.CatalogEntityDeleteEventHandler
- All Implemented Interfaces:
CatalogEntityEventHandler
-
Constructor Summary
ConstructorsConstructorDescriptionCatalogEntityDeleteEventHandler
(CatalogItemService<CatalogItem> catalogItemService, CatalogEntityEventHandlerUtility eventHandlerUtility, com.jayway.jsonpath.Configuration jsonPathConfiguration, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<CatalogItem>
buildCatalogItemFromEntity
(com.broadleafcommerce.data.tracking.core.Trackable entity, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) boolean
canHandle
(org.springframework.context.ApplicationEvent event) protected CatalogItemService<CatalogItem>
protected String
getDeletedEntityClassFromEvent
(org.springframework.context.ApplicationEvent event) com.broadleafcommerce.data.tracking.core.Trackable
getDeletedEntityFromEvent
(@NonNull org.springframework.context.ApplicationEvent event) Gets the deleted entity from the given event.protected CatalogEntityEventHandlerUtility
protected com.jayway.jsonpath.Configuration
protected com.fasterxml.jackson.databind.ObjectMapper
protected com.broadleafcommerce.common.extension.TypeFactory
void
handle
(org.springframework.context.ApplicationEvent event)
-
Constructor Details
-
CatalogEntityDeleteEventHandler
public CatalogEntityDeleteEventHandler(CatalogItemService<CatalogItem> catalogItemService, CatalogEntityEventHandlerUtility eventHandlerUtility, @Nullable com.jayway.jsonpath.Configuration jsonPathConfiguration, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
getSupportedDeletedEntityClasses
-
canHandle
public boolean canHandle(org.springframework.context.ApplicationEvent event) - Specified by:
canHandle
in interfaceCatalogEntityEventHandler
-
handle
public void handle(org.springframework.context.ApplicationEvent event) - Specified by:
handle
in interfaceCatalogEntityEventHandler
-
buildCatalogItemFromEntity
protected Optional<CatalogItem> buildCatalogItemFromEntity(com.broadleafcommerce.data.tracking.core.Trackable entity, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getDeletedEntityClassFromEvent
@Nullable protected String getDeletedEntityClassFromEvent(org.springframework.context.ApplicationEvent event) -
getDeletedEntityFromEvent
public com.broadleafcommerce.data.tracking.core.Trackable getDeletedEntityFromEvent(@NonNull @NonNull org.springframework.context.ApplicationEvent event) Gets the deleted entity from the given event.- Parameters:
event
- theApplicationEvent
that was emitted for the deleted entity- Returns:
- the deleted entity from the given event
-
getCatalogItemService
-
getEventHandlerUtility
-
getJsonPathConfiguration
protected com.jayway.jsonpath.Configuration getJsonPathConfiguration() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getObjectMapper
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-