Class MessageDelivery

    • Field Detail

      • messageId

        protected java.lang.String messageId
      • deliveryMethod

        protected Channel deliveryMethod
      • senderId

        protected long senderId
      • deliveryTime

        protected java.time.ZonedDateTime deliveryTime
      • primaryDocument

        protected Document primaryDocument
      • attachments

        protected java.util.List<Document> attachments
    • Constructor Detail

      • MessageDelivery

        public MessageDelivery()
      • MessageDelivery

        public MessageDelivery​(java.lang.String messageId,
                               Channel channel,
                               MessageStatus status,
                               java.time.ZonedDateTime deliveryTime)
    • Method Detail

      • getLinks

        protected java.util.List<Link> getLinks()
      • setLinks

        protected void setLinks​(java.util.List<Link> links)
      • getMessageId

        public java.lang.String getMessageId()
      • getAttachments

        public java.util.List<Document> getAttachments()
      • isSameMessageAs

        public boolean isSameMessageAs​(Message message)
      • 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 java.time.ZonedDateTime getDeliveryTime()
      • getPrimaryDocument

        public Document getPrimaryDocument()
      • getAllDocuments

        public java.util.stream.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​(java.util.UUID uuid)
      • getSenderId

        public java.util.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.