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_MATCH

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    NotificationAwareDomainMapperMember(com.broadleafcommerce.common.extension.TypeFactory factory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 given messageType.
    <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)
     
     
    com.broadleafcommerce.common.extension.TypeFactory
     
    protected void
    initializeContainerValues(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> D
    setupAllNotificationContainerStates(Object businessDomain, D repositoryDomain)
     
    protected void
    setupDeployNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, String changeStatus)
    Sets up NotificationState instances on entity that are specific to ChangeDeploy.
    protected void
    setupGeneralNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity)
     
    protected void
    setupSummaryNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, ChangeSummary businessDomain)
    Sets up NotificationState instances on entity that are specific to ChangeSummary.

    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

    • NotificationAwareDomainMapperMember

      public NotificationAwareDomainMapperMember(com.broadleafcommerce.common.extension.TypeFactory factory)
  • Method Details

    • getDataRoutePartition

      public String getDataRoutePartition()
      Specified by:
      getDataRoutePartition in interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
    • 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
    • setupAllNotificationContainerStates

      protected <D> D setupAllNotificationContainerStates(Object businessDomain, D repositoryDomain)
    • setupSummaryNotificationContainerStates

      protected void setupSummaryNotificationContainerStates(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity, ChangeSummary businessDomain)
      Sets up NotificationState instances on entity that are specific to ChangeSummary.
      Parameters:
      entity - the persisted domain instance of ChangeSummary on which notification states need to be set up
      businessDomain - an instance of ChangeSummary
    • 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)
      Sets up NotificationState instances on entity that are specific to ChangeDeploy.
      Parameters:
      entity - the persisted domain instance of ChangeDeploy on which notification states need to be set up
      changeStatus - the ChangeDeploy.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 given messageType.
      Parameters:
      entity - the entity whose notification states should be updated
      messageType - 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:
      deleteMap in interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
    • getFactory

      public com.broadleafcommerce.common.extension.TypeFactory getFactory()