Class SelectByContentId

java.lang.Object
com.adaptris.util.text.mime.SelectByContentId
All Implemented Interfaces:
PartSelector

public class SelectByContentId extends Object implements PartSelector
PartSelector implementation that selects by the Content-Id header of the MimeBodyPart.

In the adapter configuration file this class is aliased as mime-select-by-content-id which is the preferred alternative to the fully qualified classname when building your configuration.

  • Constructor Details

    • SelectByContentId

      public SelectByContentId()
    • SelectByContentId

      public SelectByContentId(String s)
  • Method Details

    • select

      public javax.mail.internet.MimeBodyPart select(BodyPartIterator in) throws javax.mail.MessagingException
      Description copied from interface: PartSelector
      Select the body part that should form the AdaptrisMessage payload.
      Specified by:
      select in interface PartSelector
      Returns:
      the MimeBodyPart that should be the body, or null if no match found.
      Throws:
      javax.mail.MessagingException
    • select

      public List<javax.mail.internet.MimeBodyPart> select(javax.mail.internet.MimeMultipart in) throws javax.mail.MessagingException
      Description copied from interface: PartSelector
      Select the body part that should form the AdaptrisMessage payload.
      Specified by:
      select in interface PartSelector
      Parameters:
      in - a MimeMultipart
      Returns:
      a list of MimeBodyPart that should be the body, empty if no match found.
      Throws:
      javax.mail.MessagingException
    • getContentId

      public String getContentId()
      Returns:
      the position
    • setContentId

      public void setContentId(String i)
      The Content-Id of the MimeBodyPart to select.
      Parameters:
      i - the position to set, count