Class PromotionalCategoryProductCatalogEntityDeletedEventHandler

java.lang.Object
com.broadleafcommerce.catalog.messaging.entitydeletion.handlers.AbstractCatalogEntityDeletedEventHandler
com.broadleafcommerce.catalog.messaging.entitydeletion.handlers.PromotionalCategoryProductCatalogEntityDeletedEventHandler
All Implemented Interfaces:
CatalogEntityDeletedEventHandler

public class PromotionalCategoryProductCatalogEntityDeletedEventHandler extends AbstractCatalogEntityDeletedEventHandler
The CatalogEntityDeletedEventHandler instance to clean up PromotionalCategoryProducts when a JpaProduct is deleted.
Author:
Sunny Yu
  • Constructor Details

    • PromotionalCategoryProductCatalogEntityDeletedEventHandler

      public PromotionalCategoryProductCatalogEntityDeletedEventHandler(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, PromotionalCategoryProductService<PromotionalCategoryProduct> promotionalCategoryProductService)
  • Method Details

    • getSupportedDeletedEntityClasses

      public Set<Class<?>> getSupportedDeletedEntityClasses()
      Description copied from class: AbstractCatalogEntityDeletedEventHandler
      An abstract method to return a Set of classes of the deleted entities that are supported.

      For example, if a CatalogEntityDeletedEventHandler instance can only handle the event when the JpaProduct is deleted, this handler instance would be skipped when the emitted event is for a JpaCategoryProduct.

      Specified by:
      getSupportedDeletedEntityClasses in class AbstractCatalogEntityDeletedEventHandler
    • handle

      public void handle(@NonNull @NonNull org.springframework.context.ApplicationEvent event)
      Description copied from interface: CatalogEntityDeletedEventHandler
      Handles the ApplicationEvent that represents the catalog entity deletion.
      Parameters:
      event - the ApplicationEvent that potentially represents the catalog entity deletion
    • handlePromotionalCategoryProductDeletionByProductIds

      protected void handlePromotionalCategoryProductDeletionByProductIds(@NonNull @NonNull Collection<String> productIds, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • handlePromotionalCategoryProductDeletionByCategoryIds

      protected void handlePromotionalCategoryProductDeletionByCategoryIds(@NonNull @NonNull Collection<String> categoryIds, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getPromotionalCategoryProductService

      protected PromotionalCategoryProductService<PromotionalCategoryProduct> getPromotionalCategoryProductService()