Class ExtractMessageInformationAction

java.lang.Object
org.nuxeo.ecm.platform.mail.listener.action.AbstractMailAction
org.nuxeo.ecm.platform.mail.listener.action.ExtractMessageInformationAction
All Implemented Interfaces:
MessageAction

public class ExtractMessageInformationAction extends AbstractMailAction
Puts on the pipe execution context the values retrieved from the new messages found in the INBOX. These values are used later when new MailMessage documents are created based on them.
Author:
Catalin Baican
  • Field Details

  • Constructor Details

    • ExtractMessageInformationAction

      public ExtractMessageInformationAction()
  • Method Details

    • execute

      public boolean execute(ExecutionContext context)
      Description copied from interface: MessageAction
      Executes one action.

      If it returns false, the following actions from the pipe are not executed.

      Specified by:
      execute in interface MessageAction
      Overrides:
      execute in class AbstractMailAction
      See Also:
    • getFilename

      protected static String getFilename(javax.mail.Part p, String defaultFileName) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException
    • getAttachmentParts

      protected void getAttachmentParts(javax.mail.Part part, String defaultFilename, MimetypeRegistry mimeService, ExecutionContext context) throws javax.mail.MessagingException, IOException
      Throws:
      javax.mail.MessagingException
      IOException
    • decodeMailBody

      protected static String decodeMailBody(javax.mail.Part part) throws javax.mail.MessagingException, IOException
      Interprets the body accordingly to the charset used. It relies on the content type being ****;charset={charset};******
      Returns:
      the decoded String
      Throws:
      javax.mail.MessagingException
      IOException
    • getHeaderValues

      public Collection<String> getHeaderValues(javax.mail.Message message, String headerName) throws javax.mail.MessagingException
      Throws:
      javax.mail.MessagingException