Class ContentTargetingActionCacheInvalidationEventConsumer

java.lang.Object
com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
com.broadleafcommerce.advancedcms.event.consumer.ContentTargetingActionCacheInvalidationEventConsumer
All Implemented Interfaces:
com.broadleafcommerce.jobsevents.service.EntityManagerFactoryAwareSystemEventConsumer, com.broadleafcommerce.jobsevents.service.SystemEventConsumer, org.springframework.core.Ordered

@Component("blContentTargetingActionCacheInvalidationEventConsumer") public class ContentTargetingActionCacheInvalidationEventConsumer extends com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
This CacheInvalidationEventConsumer will remove the related ContentTargetingAction cache for a ContentTargetActionXref cache invalidation event. This is needed due to the unique relationships around ContentTargetActionXref.
Author:
Chad Harchar (charchar)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected javax.cache.CacheManager
     
     
    protected jakarta.persistence.EntityManager
     
    protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil
     

    Fields inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer

    entityManagerFactory

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE

    Fields inherited from interface com.broadleafcommerce.jobsevents.service.SystemEventConsumer

    DEFAULT_PRECEDENCE
  • Constructor Summary

    Constructors
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    canHandleEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected boolean
    checkEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event, Class<? extends Object> clazz)
     
    void
    consumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
     
    int
     
    protected Long
    lookupIdentifierForEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     

    Methods inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer

    getEntityManagerFactory, setEntityManagerFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • contentTargeterService

      protected ContentTargeterService contentTargeterService
    • transUtil

      protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil
    • cacheManager

      protected javax.cache.CacheManager cacheManager
    • em

      protected jakarta.persistence.EntityManager em
  • Constructor Details

    • ContentTargetingActionCacheInvalidationEventConsumer

      public ContentTargetingActionCacheInvalidationEventConsumer()
  • Method Details

    • consumeEvent

      public void consumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • canHandleEvent

      protected boolean canHandleEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • checkEntityType

      protected boolean checkEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event, Class<? extends Object> clazz)
    • lookupIdentifierForEvent

      protected Long lookupIdentifierForEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • getEventType

      public String getEventType()
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Overrides:
      getOrder in class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer