Class MdnMimeMessageInspector


  • public class MdnMimeMessageInspector
    extends Object
    Inspects the various properties and parts of an MDN wrapped in a S/MIME message.

    This class is typically used by the sender of the business message, which will receive an MDN from the receiving party.

    Part 0 : multipart/report; report-type=disposition-notification; 0 : Sub part 0 : text/plain 0 : Sub part 1 : message/disposition-notification 0 : Sub part x : will not be used by Oxalis Part 1 : application/pkcs7-signature; name=smime.p7s; smime-type=signed-data

    Since:
    5.0.0
    Author:
    steinar, thore, aaron-kumar
    • Constructor Detail

      • MdnMimeMessageInspector

        public MdnMimeMessageInspector​(jakarta.mail.internet.MimeMessage mdnMimeMessage)
    • Method Detail

      • getSignedMultiPart

        public jakarta.mail.internet.MimeMultipart getSignedMultiPart()
      • getMultipartReport

        public jakarta.mail.internet.MimeMultipart getMultipartReport()
        The multipart/report should contain both a text/plain part with textual information and a message/disposition-notification part that should be examined for error/failure/warning.
      • getPlainTextBodyPart

        public jakarta.mail.BodyPart getPlainTextBodyPart()
        We assume that the first text/plain part is the one containing any textual information.
      • getMessageDispositionNotificationPart

        public jakarta.mail.BodyPart getMessageDispositionNotificationPart()
        We search for the first message/disposition-notification part. If we don't find one of that type we assume that part 2 is the right one.
      • getPlainTextPartAsText

        public String getPlainTextPartAsText()
      • isOkOrWarning

        public boolean isOkOrWarning​(Mic outboundMic)
                              throws NoSuchAlgorithmException
        Decode MDN and make sure the message was processed (allow for warnings)
        Parameters:
        outboundMic - the outbound mic to verify against
        Throws:
        NoSuchAlgorithmException