Class AdvancedOfferPromotionMessageCacheInvalidationEventConsumer

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

@Component("blAdvancedOfferPromotionMessageCacheInvalidationEventConsumer") public class AdvancedOfferPromotionMessageCacheInvalidationEventConsumer extends com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
Responsible for evicting entries from the PromotionMessage cache on a production deploy.
Author:
Chris Kittrell (ckittrell)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.broadleafcommerce.core.catalog.service.CatalogService
     
    protected com.broadleafcommerce.enterprise.common.extension.offer.PromotionMessageCacheInvalidationEventConsumerExtensionManager
     
     
    protected org.broadleafcommerce.common.sandbox.SandBoxHelper
     
    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
    void
    consumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected boolean
    eventHasEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event, Class<?> targetClass)
     
    protected List<org.broadleafcommerce.core.catalog.domain.Product>
    gatherRelatedProducts(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected String
    getClassName(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
     
    protected String
    getIdentifierValue(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    int
     
    protected org.broadleafcommerce.core.catalog.domain.Product
    getProductInstance(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected boolean
    isOfferEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected boolean
    isProductEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected boolean
    isPromotionMessageEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
     
    protected boolean
    shouldClearCache(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

    • extensionManager

      protected com.broadleafcommerce.enterprise.common.extension.offer.PromotionMessageCacheInvalidationEventConsumerExtensionManager extensionManager
    • transUtil

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

      protected AdvancedOfferPromotionMessageGenerator promotionMessageGenerator
    • catalogService

      protected org.broadleafcommerce.core.catalog.service.CatalogService catalogService
    • sandBoxHelper

      protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
  • Constructor Details

    • AdvancedOfferPromotionMessageCacheInvalidationEventConsumer

      public AdvancedOfferPromotionMessageCacheInvalidationEventConsumer()
  • Method Details

    • consumeEvent

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

      protected boolean isOfferEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • isPromotionMessageEntityType

      protected boolean isPromotionMessageEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • isProductEntityType

      protected boolean isProductEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • eventHasEntityType

      protected boolean eventHasEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event, Class<?> targetClass) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getProductInstance

      protected org.broadleafcommerce.core.catalog.domain.Product getProductInstance(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • shouldClearCache

      protected boolean shouldClearCache(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • gatherRelatedProducts

      protected List<org.broadleafcommerce.core.catalog.domain.Product> gatherRelatedProducts(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • getClassName

      protected String getClassName(com.broadleafcommerce.jobsevents.domain.SystemEvent event)
    • getIdentifierValue

      protected String getIdentifierValue(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