Class Message

    • Field Detail

      • messageId

        public final java.lang.String messageId
      • senderId

        public final java.lang.Long senderId
      • deliveryTime

        public final java.time.ZonedDateTime deliveryTime
      • invoiceReference

        public final java.lang.String invoiceReference
      • primaryDocument

        public final Document primaryDocument
      • attachments

        public final java.util.List<Document> attachments
    • Method Detail

      • copyMessageWithOnlyPrintDetails

        public static Message copyMessageWithOnlyPrintDetails​(Message messageToCopy)
      • copyMessageWithOnlyDigipostDetails

        public static Message copyMessageWithOnlyDigipostDetails​(Message messageToCopy)
      • getAllDocuments

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

        public boolean isDirectPrint()
      • isSameMessageAs

        public boolean isSameMessageAs​(Message message)
      • hasAnyDocumentRequiringEncryption

        public boolean hasAnyDocumentRequiringEncryption()
      • getChannel

        public Channel getChannel()
      • documentOrder

        public java.util.Comparator<? super Document> documentOrder()
        Returns:
        Comparator which order documents by the same order as they are contained in this message. If a document
      • getSenderId

        public java.util.Optional<SenderId> getSenderId()
        Specified by:
        getSenderId in interface MayHaveSender
        Returns:
        the sender ID, or Optional.empty() if it does not exist.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object