Class PromotionalProductCatalogEntityDeletedEventHandler
java.lang.Object
com.broadleafcommerce.catalog.messaging.entitydeletion.handlers.AbstractCatalogEntityDeletedEventHandler
com.broadleafcommerce.catalog.messaging.entitydeletion.handlers.PromotionalProductCatalogEntityDeletedEventHandler
- All Implemented Interfaces:
CatalogEntityDeletedEventHandler
public class PromotionalProductCatalogEntityDeletedEventHandler
extends AbstractCatalogEntityDeletedEventHandler
The
CatalogEntityDeletedEventHandler instance to clean up PromotionalProducts when a JpaProduct is deleted.- Author:
- Sunny Yu
-
Constructor Summary
ConstructorsConstructorDescriptionPromotionalProductCatalogEntityDeletedEventHandler(com.broadleafcommerce.data.tracking.core.tenant.service.CommonCatalogService<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> catalogService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.data.tracking.core.web.ContextRequestHydrator contextRequestHydrator, PromotionalProductService<PromotionalProduct> promotionalProductService) -
Method Summary
Modifier and TypeMethodDescriptionprotected PromotionalProductService<PromotionalProduct>An abstract method to return aSetof classes of the deleted entities that are supported.voidhandle(@NonNull org.springframework.context.ApplicationEvent event) Handles theApplicationEventthat represents the catalog entity deletion.Methods inherited from class com.broadleafcommerce.catalog.messaging.entitydeletion.handlers.AbstractCatalogEntityDeletedEventHandler
buildContext, buildHydratedContextInfo, buildMatchingContextInfo, buildMatchingContextRequest, buildMatchingContextRequest, canHandle, getCatalogService, getContextRequestHydrator, getDeletedEntityClassFromEvent, getDeletedEntityFromEvent, getObjectMapper, getTypeFactory
-
Constructor Details
-
PromotionalProductCatalogEntityDeletedEventHandler
public PromotionalProductCatalogEntityDeletedEventHandler(com.broadleafcommerce.data.tracking.core.tenant.service.CommonCatalogService<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> catalogService, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.data.tracking.core.web.ContextRequestHydrator contextRequestHydrator, PromotionalProductService<PromotionalProduct> promotionalProductService)
-
-
Method Details
-
getSupportedDeletedEntityClasses
Description copied from class:AbstractCatalogEntityDeletedEventHandlerAn abstract method to return aSetof classes of the deleted entities that are supported.For example, if a
CatalogEntityDeletedEventHandlerinstance can only handle the event when theJpaProductis deleted, this handler instance would be skipped when the emitted event is for aJpaCategoryProduct.- Specified by:
getSupportedDeletedEntityClassesin classAbstractCatalogEntityDeletedEventHandler
-
handle
public void handle(@NonNull @NonNull org.springframework.context.ApplicationEvent event) Description copied from interface:CatalogEntityDeletedEventHandlerHandles theApplicationEventthat represents the catalog entity deletion.- Parameters:
event- theApplicationEventthat potentially represents the catalog entity deletion
-
getPromotionalProductService
-