psdi.common.emailstner

Class MailDataMsgBodyUtility

  • java.lang.Object
    • psdi.common.emailstner.MailDataMsgBodyUtility


  • public class MailDataMsgBodyUtility
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.List getImgSrcCidUris(java.lang.String msgBody)
      This method searches a message's HTML message body, creates and returns a list of all of the content-id URIs found.
      static boolean imgSrcCidUriContainsBodyCid(java.util.List imgCidUris, java.lang.String bodyCid)
      This method sifts though a list of image source content-id URIs to determine if there's an occurrence of a raw message body contained content-id.
      static boolean messageBodyContainsHtml(java.lang.String msgBody) 
      static java.lang.String replaceSrcCidUriWithWebUrl(java.lang.String msgBody, java.lang.String bodyCid, java.lang.String webUrl) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MailDataMsgBodyUtility

        public MailDataMsgBodyUtility()
    • Method Detail

      • messageBodyContainsHtml

        public static boolean messageBodyContainsHtml(java.lang.String msgBody)
        Parameters:
        msgBody -
        Returns:
        true If the msgBody is composed of HTML.
      • getImgSrcCidUris

        public static java.util.List getImgSrcCidUris(java.lang.String msgBody)
        This method searches a message's HTML message body, creates and returns a list of all of the content-id URIs found.
        Parameters:
        msgBody -
        Returns:
        imgSrcCidsUris A list contains all the content ID URIs contained in src values.
      • imgSrcCidUriContainsBodyCid

        public static boolean imgSrcCidUriContainsBodyCid(java.util.List imgCidUris,
                                                          java.lang.String bodyCid)
        This method sifts though a list of image source content-id URIs to determine if there's an occurrence of a raw message body contained content-id.
        Parameters:
        imgCidUris - The list of content ID URIs to sift through.
        bodyCid - The content ID we're seeking.
        Returns:
        true if the bodyCid is found in a URI.
      • replaceSrcCidUriWithWebUrl

        public static java.lang.String replaceSrcCidUriWithWebUrl(java.lang.String msgBody,
                                                                  java.lang.String bodyCid,
                                                                  java.lang.String webUrl)
        Parameters:
        msgBody - The body of the message.
        bodyCid - The message body content ID.
        webUrl - The image doc URL used to replace the source value.
        Returns:
        The HTML updated with image doc URL.