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
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.catalog.service.CatalogServiceprotected com.broadleafcommerce.enterprise.common.extension.offer.PromotionMessageCacheInvalidationEventConsumerExtensionManagerprotected AdvancedOfferPromotionMessageGeneratorprotected org.broadleafcommerce.common.sandbox.SandBoxHelperprotected org.broadleafcommerce.common.util.StreamingTransactionCapableUtilFields inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
entityManagerFactoryFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCEFields inherited from interface com.broadleafcommerce.jobsevents.service.SystemEventConsumer
DEFAULT_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconsumeEvent(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected booleaneventHasEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event, Class<?> targetClass) protected List<org.broadleafcommerce.core.catalog.domain.Product>gatherRelatedProducts(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected StringgetClassName(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected StringgetIdentifierValue(com.broadleafcommerce.jobsevents.domain.SystemEvent event) intgetOrder()protected org.broadleafcommerce.core.catalog.domain.ProductgetProductInstance(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected booleanisOfferEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected booleanisProductEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected booleanisPromotionMessageEntityType(com.broadleafcommerce.jobsevents.domain.SystemEvent event) protected booleanshouldClearCache(com.broadleafcommerce.jobsevents.domain.SystemEvent event) Methods inherited from class com.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
getEntityManagerFactory, setEntityManagerFactory
-
Field Details
-
extensionManager
protected com.broadleafcommerce.enterprise.common.extension.offer.PromotionMessageCacheInvalidationEventConsumerExtensionManager extensionManager -
transUtil
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil -
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
-
getIdentifierValue
-
getEventType
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Overrides:
getOrderin classcom.broadleafcommerce.jobsevents.service.AbstractSystemEventConsumer
-