Class MessageDelivery

java.lang.Object
no.digipost.api.client.representations.Representation
no.digipost.api.client.representations.MessageDelivery
All Implemented Interfaces:
MayHaveSender

public class MessageDelivery extends Representation implements MayHaveSender
  • Field Details

    • messageId

      protected String messageId
    • deliveryMethod

      protected Channel deliveryMethod
    • senderId

      protected long senderId
    • status

      protected MessageStatus status
    • deliveryTime

      protected ZonedDateTime deliveryTime
    • primaryDocument

      protected Document primaryDocument
    • attachments

      protected List<Document> attachments
  • Constructor Details

  • Method Details

    • getLinks

      protected List<Link> getLinks()
    • setLinks

      protected void setLinks(List<Link> links)
    • getMessageId

      public String getMessageId()
    • getAttachments

      public List<Document> getAttachments()
    • isSameMessageAs

      public boolean isSameMessageAs(Message message)
    • getStatus

      public MessageStatus getStatus()
    • getEncryptionKeyLink

      public Link getEncryptionKeyLink()
    • getSendLink

      public Link getSendLink()
    • willBeDeliveredInDigipost

      public boolean willBeDeliveredInDigipost()
    • isAlreadyDeliveredToDigipost

      public boolean isAlreadyDeliveredToDigipost()
    • getSelfLink

      public Link getSelfLink()
    • getChannel

      public Channel getChannel()
    • getDeliveryTime

      public ZonedDateTime getDeliveryTime()
    • getPrimaryDocument

      public Document getPrimaryDocument()
    • getAllDocuments

      public Stream<Document> getAllDocuments()
      Returns:
      an ordered Stream containing every Document in this delivery. The primary document will be the first element of the stream, with the attachments following.
    • getDocument

      public Document getDocument(UUID uuid)
    • getSenderId

      public Optional<SenderId> getSenderId()
      Always returns the resolved sender-id of the message, i.e. what the receiver of the message sees as the sender of the message. If the originating Message has specified no sender-id nor sender-organization, it will be set to the broker-id which was specified in the X-Digipost-UserId header of the initiating request.
      Specified by:
      getSenderId in interface MayHaveSender
      Returns:
      always the sender-id, never null.
    • getSenderOrganization

      public Optional<SenderOrganization> getSenderOrganization()
      Specified by:
      getSenderOrganization in interface MayHaveSender
      Returns:
      always Optional.empty()
      See Also: