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_MATCHFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionPromotionCacheInvalidationNotificationStateMapperMember(com.broadleafcommerce.common.messaging.notification.NotificationStateService notificationStateService, com.broadleafcommerce.common.messaging.notification.NotificationHandler handler, PromotionCacheInvalidationHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected <D,P> D delayIfApplicable(D repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) <D> DdeleteMap(D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) <D> DfromBusinessDomain(Object businessDomain, D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) protected com.broadleafcommerce.common.messaging.notification.NotificationHandlerprotected com.broadleafcommerce.common.messaging.notification.NotificationStateServicecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateinitState(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) voidonApplicationEvent(com.broadleafcommerce.data.tracking.core.service.NotificationInitializeEvent event) protected booleanshouldSuppress(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, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
getBusinessDomainTypeMethods 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:
onApplicationEventin interfaceorg.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:
fromBusinessDomainin interfacecom.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:
modifyMapin interfacecom.broadleafcommerce.data.tracking.core.mapping.DomainMapper
-
deleteMap
public <D> D deleteMap(D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
deleteMapin interfacecom.broadleafcommerce.data.tracking.core.mapping.DomainMapper
-
getDataRoutePartition
- Specified by:
getDataRoutePartitionin interfacecom.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
-
getNotificationStateService
@NonNull protected com.broadleafcommerce.common.messaging.notification.NotificationStateService getNotificationStateService() -
getHandler
@NonNull protected com.broadleafcommerce.common.messaging.notification.NotificationHandler getHandler()
-