Class DefaultMessagePayloadExtractor
- java.lang.Object
-
- com.flowable.platform.engine.impl.eventregistry.mail.DefaultMessagePayloadExtractor
-
- All Implemented Interfaces:
MessagePayloadExtractor
public class DefaultMessagePayloadExtractor extends Object implements MessagePayloadExtractor
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected static Collection<String>KNOWN_HEADERSprotected org.slf4j.Loggerloggerprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapper-
Fields inherited from interface com.flowable.platform.engine.impl.eventregistry.mail.MessagePayloadExtractor
ATTACHMENTS, BCC, CC, CONTENT, CONTENT_HTML, CUSTOM_HEADERS, FROM, RAW_MAIL_BYTES, RECEIVED_DATE, SENT_DATE, SUBJECT, SUBJECT_CORRELATION, TO
-
-
Constructor Summary
Constructors Constructor Description DefaultMessagePayloadExtractor(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringencodeDataSourceToString(DataSource dataSource)protected com.fasterxml.jackson.databind.node.ArrayNodeextractAttachments(List<DataSource> attachments)protected com.fasterxml.jackson.databind.node.ObjectNodeextractCustomHeaders(javax.mail.Message message)protected StringextractDate(Date date)Collection<EventPayloadInstance>extractPayload(MailInboundChannelModel inboundChannelModel, javax.mail.internet.MimeMessage message)protected StringextractRawMailBytes(javax.mail.Message message)protected com.fasterxml.jackson.databind.node.ArrayNodeextractRecipients(javax.mail.Message message, javax.mail.Message.RecipientType recipientType)protected StringextractSubjectCorrelation(MailInboundChannelModel inboundChannelModel, String subject)
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
-
KNOWN_HEADERS
protected static final Collection<String> KNOWN_HEADERS
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Method Detail
-
extractPayload
public Collection<EventPayloadInstance> extractPayload(MailInboundChannelModel inboundChannelModel, javax.mail.internet.MimeMessage message) throws javax.mail.MessagingException
- Specified by:
extractPayloadin interfaceMessagePayloadExtractor- Throws:
javax.mail.MessagingException
-
extractSubjectCorrelation
protected String extractSubjectCorrelation(MailInboundChannelModel inboundChannelModel, String subject)
-
extractAttachments
protected com.fasterxml.jackson.databind.node.ArrayNode extractAttachments(List<DataSource> attachments) throws IOException
- Throws:
IOException
-
encodeDataSourceToString
protected String encodeDataSourceToString(DataSource dataSource) throws IOException
- Throws:
IOException
-
extractRecipients
protected com.fasterxml.jackson.databind.node.ArrayNode extractRecipients(javax.mail.Message message, javax.mail.Message.RecipientType recipientType) throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-
extractCustomHeaders
protected com.fasterxml.jackson.databind.node.ObjectNode extractCustomHeaders(javax.mail.Message message) throws javax.mail.MessagingException- Throws:
javax.mail.MessagingException
-
extractRawMailBytes
protected String extractRawMailBytes(javax.mail.Message message) throws IOException, javax.mail.MessagingException
- Throws:
IOExceptionjavax.mail.MessagingException
-
-