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
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static String
decodeMailBody
(javax.mail.Part part) Interprets the body accordingly to the charset used.boolean
execute
(ExecutionContext context) Executes one action.protected void
getAttachmentParts
(javax.mail.Part part, String defaultFilename, MimetypeRegistry mimeService, ExecutionContext context) protected static String
getFilename
(javax.mail.Part p, String defaultFileName) getHeaderValues
(javax.mail.Message message, String headerName) Methods inherited from class org.nuxeo.ecm.platform.mail.listener.action.AbstractMailAction
getCoreSession, reset
-
Field Details
-
DEFAULT_BINARY_MIMETYPE
- See Also:
-
MESSAGE_RFC822_MIMETYPE
- See Also:
-
COPY_MESSAGE
- See Also:
-
-
Constructor Details
-
ExtractMessageInformationAction
public ExtractMessageInformationAction()
-
-
Method Details
-
execute
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 interfaceMessageAction
- Overrides:
execute
in classAbstractMailAction
- 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
-