Class DefaultMessagePayloadExtractor
java.lang.Object
com.flowable.platform.engine.impl.eventregistry.mail.DefaultMessagePayloadExtractor
- All Implemented Interfaces:
MessagePayloadExtractor
- Author:
- Filip Hrisafov
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Collection<String>
protected final org.slf4j.Logger
protected com.fasterxml.jackson.databind.ObjectMapper
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
ConstructorDescriptionDefaultMessagePayloadExtractor
(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected String
encodeDataSourceToString
(jakarta.activation.DataSource dataSource) protected com.fasterxml.jackson.databind.node.ArrayNode
extractAttachments
(List<jakarta.activation.DataSource> attachments) protected com.fasterxml.jackson.databind.node.ObjectNode
extractCustomHeaders
(jakarta.mail.Message message) protected String
extractDate
(Date date) protected String
extractFrom
(jakarta.mail.internet.MimeMessage message) extractPayload
(MailInboundChannelModel inboundChannelModel, jakarta.mail.internet.MimeMessage message) protected String
extractRawMailBytes
(jakarta.mail.Message message) protected com.fasterxml.jackson.databind.node.ArrayNode
extractRecipients
(jakarta.mail.Message message, jakarta.mail.Message.RecipientType recipientType) protected String
extractSubjectCorrelation
(MailInboundChannelModel inboundChannelModel, String subject)
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
KNOWN_HEADERS
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
DefaultMessagePayloadExtractor
public DefaultMessagePayloadExtractor(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
extractPayload
public Collection<EventPayloadInstance> extractPayload(MailInboundChannelModel inboundChannelModel, jakarta.mail.internet.MimeMessage message) throws jakarta.mail.MessagingException - Specified by:
extractPayload
in interfaceMessagePayloadExtractor
- Throws:
jakarta.mail.MessagingException
-
extractFrom
protected String extractFrom(jakarta.mail.internet.MimeMessage message) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
extractSubjectCorrelation
protected String extractSubjectCorrelation(MailInboundChannelModel inboundChannelModel, String subject) -
extractAttachments
protected com.fasterxml.jackson.databind.node.ArrayNode extractAttachments(List<jakarta.activation.DataSource> attachments) throws IOException - Throws:
IOException
-
encodeDataSourceToString
protected String encodeDataSourceToString(jakarta.activation.DataSource dataSource) throws IOException - Throws:
IOException
-
extractDate
-
extractRecipients
protected com.fasterxml.jackson.databind.node.ArrayNode extractRecipients(jakarta.mail.Message message, jakarta.mail.Message.RecipientType recipientType) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
extractCustomHeaders
protected com.fasterxml.jackson.databind.node.ObjectNode extractCustomHeaders(jakarta.mail.Message message) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
extractRawMailBytes
protected String extractRawMailBytes(jakarta.mail.Message message) throws IOException, jakarta.mail.MessagingException - Throws:
IOException
jakarta.mail.MessagingException
-