Interface NotificationStateValueUpdater

All Superinterfaces:
com.broadleafcommerce.common.messaging.notification.NotificationStateRepository, com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment
All Known Implementing Classes:
JpaNotificationStateRepositoryFragment

public interface NotificationStateValueUpdater extends com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment
Additional functionality for flows that need to work with NotificationState as a separate concept from the entity itself. This occurs when the notification state is persisted separately from the entity, as is the case with Jpa.
Author:
Jeff Fischer
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>
    findNotificationMembers(Class<?> entityType, String nativeId)
    Based on identifying factors entityType, and nativeId, retrieve all the associated NotificationState instances.
    boolean
    setNotificationValues(Object nativeId, String messageType, Class<?> entityType, Map<String,Object> vals)
    Based on identifying factors nativeId, messageType, and entityType, set other fields (identified by vals map key) on NotificationState to the corresponding value from the vals map.

    Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository

    findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
  • Method Details

    • setNotificationValues

      boolean setNotificationValues(@NonNull Object nativeId, @NonNull String messageType, @NonNull Class<?> entityType, @NonNull Map<String,Object> vals)
      Based on identifying factors nativeId, messageType, and entityType, set other fields (identified by vals map key) on NotificationState to the corresponding value from the vals map.
      Parameters:
      nativeId - The primary key value of the related container entity. See JpaNotificationState.getContainer().
      messageType - The message type for this notification state. See NotificationState.getMessageType().
      entityType - The entity type of the related container entity. See JpaNotificationState.getEntityType().
      vals - The field name and update value pairs to apply to the identified NotificationState.
      Returns:
      Whether or not a NotificationState instance was actually updated as a result of this call.
    • findNotificationMembers

      List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> findNotificationMembers(@NonNull Class<?> entityType, @NonNull String nativeId)
      Based on identifying factors entityType, and nativeId, retrieve all the associated NotificationState instances.
      Parameters:
      entityType - The entity type of the related container entity. See JpaNotificationState.getEntityType().
      nativeId - The primary key value of the related container entity. See JpaNotificationState.getContainer().
      Returns:
      The list of related JpaNotificationState instances.