Class NotificationAwareDomainMapperMember
java.lang.Object
com.broadleafcommerce.sandbox.messaging.mapping.NotificationAwareDomainMapperMember
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware,com.broadleafcommerce.data.tracking.core.mapping.DomainMapper,com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember,org.springframework.core.Ordered
- Direct Known Subclasses:
JpaNotificationAwareDomainMapperMember
public class NotificationAwareDomainMapperMember
extends Object
implements com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
Map new
NotificationStateAware instances with ready-to-use NotificationState
values for the TransitionRequest class of producers.- Author:
- Jeff Fischer
-
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
ConstructorsConstructorDescriptionNotificationAwareDomainMapperMember(com.broadleafcommerce.common.extension.TypeFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanaddStateContainerIfApplicable(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String messageType) Adds a state container to the notification states list if not already present for the givenmessageType.<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) com.broadleafcommerce.common.extension.TypeFactoryprotected voidinitializeContainerValues(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String containerName) <D,P> D modifyMap(D repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, boolean allowNull) protected <D> DsetupAllNotificationContainerStates(Object businessDomain, D repositoryDomain) protected voidsetupDeployNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String changeStatus) protected voidsetupGeneralNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity) protected voidsetupSummaryNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, ChangeSummary businessDomain) 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
-
NotificationAwareDomainMapperMember
public NotificationAwareDomainMapperMember(com.broadleafcommerce.common.extension.TypeFactory factory)
-
-
Method Details
-
getDataRoutePartition
- Specified by:
getDataRoutePartitionin interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
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
-
setupAllNotificationContainerStates
-
setupSummaryNotificationContainerStates
protected void setupSummaryNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, ChangeSummary businessDomain) - Parameters:
entity- the persisted domain instance ofChangeSummaryon which notification states need to be set upbusinessDomain- an instance ofChangeSummary
-
setupGeneralNotificationContainerStates
protected void setupGeneralNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity) -
setupDeployNotificationContainerStates
protected void setupDeployNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String changeStatus) - Parameters:
entity- the persisted domain instance ofChangeDeployon which notification states need to be set upchangeStatus- theChangeDeploy.getStatus()found in the business instance
-
initializeContainerValues
protected void initializeContainerValues(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String containerName) -
addStateContainerIfApplicable
protected boolean addStateContainerIfApplicable(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String messageType) Adds a state container to the notification states list if not already present for the givenmessageType.- Parameters:
entity- the entity whose notification states should be updatedmessageType- the message type for which a notification state should be created- Returns:
- true if a container was created/added, false if one was already present
-
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
-
getFactory
public com.broadleafcommerce.common.extension.TypeFactory getFactory()
-