Class CatalogEntityUpdateEventHandler
java.lang.Object
com.broadleafcommerce.recommendationengine.service.messaging.handlers.CatalogEntityUpdateEventHandler
- All Implemented Interfaces:
CatalogEntityEventHandler
-
Constructor Summary
ConstructorsConstructorDescriptionCatalogEntityUpdateEventHandler(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) booleancanHandle(org.springframework.context.ApplicationEvent event) protected CatalogItemService<CatalogItem>protected CatalogEntityEventHandlerUtilityprotected com.jayway.jsonpath.Configurationprotected com.fasterxml.jackson.databind.ObjectMapperprotected com.broadleafcommerce.common.extension.TypeFactoryprotected StringgetUpdatedEntityClassFromEvent(org.springframework.context.ApplicationEvent event) com.broadleafcommerce.data.tracking.core.TrackablegetUpdatedEntityFromEvent(@NonNull org.springframework.context.ApplicationEvent event) Gets the updated entity from the given event.voidhandle(org.springframework.context.ApplicationEvent event)
-
Constructor Details
-
CatalogEntityUpdateEventHandler
public CatalogEntityUpdateEventHandler(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
-
getSupportedUpdatedEntityClasses
-
canHandle
public boolean canHandle(org.springframework.context.ApplicationEvent event) - Specified by:
canHandlein interfaceCatalogEntityEventHandler
-
handle
public void handle(org.springframework.context.ApplicationEvent event) - Specified by:
handlein interfaceCatalogEntityEventHandler
-
buildCatalogItemFromEntity
protected Optional<CatalogItem> buildCatalogItemFromEntity(com.broadleafcommerce.data.tracking.core.Trackable entity, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
getUpdatedEntityClassFromEvent
@Nullable protected String getUpdatedEntityClassFromEvent(org.springframework.context.ApplicationEvent event) -
getUpdatedEntityFromEvent
public com.broadleafcommerce.data.tracking.core.Trackable getUpdatedEntityFromEvent(@NonNull @NonNull org.springframework.context.ApplicationEvent event) Gets the updated entity from the given event.- Parameters:
event- theApplicationEventthat was emitted for the updated entity- Returns:
- the updated 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()
-