Class DigestMailQueueStorage

java.lang.Object
io.meeds.commons.digest.service.DigestMailQueueStorage

@Component public class DigestMailQueueStorage extends Object
Puts a digest email in the platform mail queue, with the same row shape and the same checks as the legacy QueueMessage.put, but through the Spring EntityManager: called inside the transaction that claims the occurrence, the queue row and the watermark commit, or roll back, together. The SendEmailNotificationJob then sends it like any other email.
  • Constructor Details

    • DigestMailQueueStorage

      public DigestMailQueueStorage(DigestMailQueueDAO mailQueueDAO, org.exoplatform.services.listener.ListenerService listenerService)
  • Method Details

    • enqueue

      public void enqueue(org.exoplatform.commons.api.notification.model.MessageInfo message)
      Queues the message in the transaction of the caller. The recipient address is checked upstream by the builder, which skips the recipient instead of building; an invalid one reaching this point is a programming error, not a run failure.
      Parameters:
      message - the digest email
      Throws:
      IllegalArgumentException - when the message has no valid recipient address