Class PromotionCacheInvalidationNotificationStateMapperMember

java.lang.Object
com.broadleafcommerce.promotion.offer.service.messaging.cache.PromotionCacheInvalidationNotificationStateMapperMember
All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware, com.broadleafcommerce.data.tracking.core.mapping.DomainMapper, com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember, EventListener, org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.NotificationInitializeEvent>, org.springframework.core.Ordered

public class PromotionCacheInvalidationNotificationStateMapperMember extends Object implements com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember, org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.NotificationInitializeEvent>
Initialize the NotificationState for PromotionCacheInvalidationProducer.TYPE. Also handle setting up the nextAttempt timestamp should there be a delay duration in effect.
  • Field Summary

    Fields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware

    ALL_MATCH

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    PromotionCacheInvalidationNotificationStateMapperMember(com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationHandler handler, PromotionCacheInvalidationHelper helper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <D, P> D
    delayIfApplicable(D repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    <D> D
    deleteMap(D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
    <D> D
    fromBusinessDomain(Object businessDomain, D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
     
    protected com.broadleafcommerce.common.messaging.notification.NotificationHandler
     
    protected com.broadleafcommerce.common.messaging.notification.NotificationStateService
     
    com.broadleafcommerce.common.messaging.notification.domain.NotificationState
    initState(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware repositoryDomain)
     
    <D, P> D
    modifyMap(D repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, boolean allowNull)
     
    void
    onApplicationEvent(com.broadleafcommerce.data.tracking.core.service.NotificationInitializeEvent event)
     
    protected boolean
    shouldSuppress(Object businessDomain, Object repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper

    getBusinessDomainType

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember

    fromRepositoryDomain, getOrder
  • Constructor Details

    • PromotionCacheInvalidationNotificationStateMapperMember

      public PromotionCacheInvalidationNotificationStateMapperMember(com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationHandler handler, PromotionCacheInvalidationHelper helper)
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(com.broadleafcommerce.data.tracking.core.service.NotificationInitializeEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.NotificationInitializeEvent>
    • fromBusinessDomain

      public <D> D fromBusinessDomain(Object businessDomain, D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      fromBusinessDomain in interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
    • modifyMap

      public <D, P> D modifyMap(D repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, boolean allowNull)
      Specified by:
      modifyMap in interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
    • deleteMap

      public <D> D deleteMap(D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      deleteMap in interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
    • getDataRoutePartition

      public String getDataRoutePartition()
      Specified by:
      getDataRoutePartition in interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
    • initState

      public com.broadleafcommerce.common.messaging.notification.domain.NotificationState initState(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware repositoryDomain)
    • delayIfApplicable

      protected <D, P> D delayIfApplicable(D repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • shouldSuppress

      protected boolean shouldSuppress(Object businessDomain, Object repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getNotificationStateService

      @NonNull protected com.broadleafcommerce.common.messaging.notification.NotificationStateService getNotificationStateService()
    • getHandler

      @NonNull protected com.broadleafcommerce.common.messaging.notification.NotificationHandler getHandler()