Class WhatsAppJmsExternalConversationSystemAdapter
java.lang.Object
com.flowable.engage.external.system.whatsapp.WhatsAppJmsExternalConversationSystemAdapter
- All Implemented Interfaces:
ExternalConversationSystemAdapter
,WhatsAppExternalConversationSystemAdapter
public class WhatsAppJmsExternalConversationSystemAdapter
extends Object
implements WhatsAppExternalConversationSystemAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JmsMessageOperations
protected final int
protected final com.fasterxml.jackson.databind.ObjectMapper
protected final String
protected final Collection<String>
Fields inherited from interface com.flowable.engage.external.system.api.ExternalConversationSystemAdapter
SEND_DOCUMENT, SEND_IMAGE, SEND_REPLY, SEND_VIDEO, SEND_VOICE
-
Constructor Summary
ConstructorsConstructorDescriptionWhatsAppJmsExternalConversationSystemAdapter
(JmsMessageOperations jmsMessagingOperations, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String outboundMessageDestination, int maximumMessageSize, Collection<String> supportedSendMessageTypes) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkMessageSize
(String content) convertAndCheckMessageSize
(String message) Deprecated.Create a message builder for the WhatsApp interactive message.Creates theExternalMessageBuilder
that is responsible for constructing the external message for the give external user id.Create a message builder for the WhatsApp template message.Returns the id of the external system implemented by this adapter.void
markMessageAsRead
(String whatsAppMessageId, String businessAccountId) Mark a WhatsApp message as read with the given business account.protected void
void
sendMessageDuringCommitting
(OutboundMessageDto outboundMessage) void
sendOutboundMessage
(OutboundMessageDto outboundMessage) void
validateMessageContent
(String messageContent, String messageCategory) Validates the content of the message.void
Deprecated.
-
Field Details
-
jmsMessagingOperations
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
outboundMessageDestination
-
maximumMessageSize
protected final int maximumMessageSize -
supportedSendMessageTypes
-
-
Constructor Details
-
WhatsAppJmsExternalConversationSystemAdapter
public WhatsAppJmsExternalConversationSystemAdapter(JmsMessageOperations jmsMessagingOperations, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String outboundMessageDestination, int maximumMessageSize, Collection<String> supportedSendMessageTypes)
-
-
Method Details
-
getExternalSystemId
Description copied from interface:ExternalConversationSystemAdapter
Returns the id of the external system implemented by this adapter.- Specified by:
getExternalSystemId
in interfaceExternalConversationSystemAdapter
- Returns:
- the external system id implemented by this adapter
-
createMessageBuilder
Description copied from interface:ExternalConversationSystemAdapter
Creates theExternalMessageBuilder
that is responsible for constructing the external message for the give external user id. This is invoked by the engage system when sending out outbound messages.- Specified by:
createMessageBuilder
in interfaceExternalConversationSystemAdapter
- Returns:
- the
ExternalMessageBuilder
-
createInteractiveMessageBuilder
Description copied from interface:WhatsAppExternalConversationSystemAdapter
Create a message builder for the WhatsApp interactive message.- Specified by:
createInteractiveMessageBuilder
in interfaceWhatsAppExternalConversationSystemAdapter
- Returns:
- the interactive message builder
-
createTemplateMessageBuilder
Description copied from interface:WhatsAppExternalConversationSystemAdapter
Create a message builder for the WhatsApp template message.- Specified by:
createTemplateMessageBuilder
in interfaceWhatsAppExternalConversationSystemAdapter
- Returns:
- the template message builder
-
createContactVerificationQuery
Deprecated.Description copied from interface:WhatsAppExternalConversationSystemAdapter
Create the verification query for WhatsApp contacts.- Specified by:
createContactVerificationQuery
in interfaceWhatsAppExternalConversationSystemAdapter
- Returns:
- the verification query
-
markMessageAsRead
Description copied from interface:WhatsAppExternalConversationSystemAdapter
Mark a WhatsApp message as read with the given business account.- Specified by:
markMessageAsRead
in interfaceWhatsAppExternalConversationSystemAdapter
- Parameters:
whatsAppMessageId
- The id of the message in WhatsApp that should be marked as readbusinessAccountId
- The business account id for which the message should be marked as read
-
validateMessageContent
Description copied from interface:ExternalConversationSystemAdapter
Validates the content of the message. If the content is invalid an exception should be thrown.- Specified by:
validateMessageContent
in interfaceExternalConversationSystemAdapter
- Parameters:
messageContent
- the content of the message that should be validatedmessageCategory
- the message category
-
fetchSupportedSendMessageTypes
- Specified by:
fetchSupportedSendMessageTypes
in interfaceExternalConversationSystemAdapter
- Returns:
- the types of messages that the adapter can send
-
convertAndCheckMessageSize
-
checkMessageSize
-
sendOutboundMessage
-
sendMessageDuringCommitting
-
verifyContact
Deprecated. -
send
-