Class WeChatJmsExternalConversationSystemAdapter
java.lang.Object
com.flowable.engage.external.system.wechat.WeChatJmsExternalConversationSystemAdapter
- All Implemented Interfaces:
ExternalConversationSystemAdapter,WeChatExternalConversationSystemAdapter
public class WeChatJmsExternalConversationSystemAdapter
extends Object
implements WeChatExternalConversationSystemAdapter
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JmsMessageOperationsprotected final intprotected final Stringprotected final Collection<String>protected final WechatEmojiConverterFields inherited from interface com.flowable.engage.external.system.api.ExternalConversationSystemAdapter
SEND_DOCUMENT, SEND_IMAGE, SEND_REPLY, SEND_VIDEO, SEND_VOICE -
Constructor Summary
ConstructorsConstructorDescriptionWeChatJmsExternalConversationSystemAdapter(JmsMessageOperations jmsMessagingOperations, String outboundMessageDestination, int maximumMessageSize, Collection<String> supportedSendMessageTypes, WechatEmojiConverter wechatEmojiConverter) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckMessageSize(String content) convertAndCheckMessageSize(String message) Creates theExternalMessageBuilderthat is responsible for constructing the external message for the give external user id.Create a message builder for the WeChat template message.Returns the id of the external system implemented by this adapter.voidsendMessageDuringCommitting(OutboundMessageDto outboundMessage) voidsendOutboundMessage(OutboundMessageDto outboundMessage) voidvalidateMessageContent(String messageContent, String messageCategory) Validates the content of the message.
-
Field Details
-
jmsMessagingOperations
-
outboundMessageDestination
-
maximumMessageSize
protected final int maximumMessageSize -
wechatEmojiConverter
-
supportedSendMessageTypes
-
-
Constructor Details
-
WeChatJmsExternalConversationSystemAdapter
public WeChatJmsExternalConversationSystemAdapter(JmsMessageOperations jmsMessagingOperations, String outboundMessageDestination, int maximumMessageSize, Collection<String> supportedSendMessageTypes, WechatEmojiConverter wechatEmojiConverter)
-
-
Method Details
-
getExternalSystemId
Description copied from interface:ExternalConversationSystemAdapterReturns the id of the external system implemented by this adapter.- Specified by:
getExternalSystemIdin interfaceExternalConversationSystemAdapter- Returns:
- the external system id implemented by this adapter
-
createMessageBuilder
Description copied from interface:ExternalConversationSystemAdapterCreates theExternalMessageBuilderthat 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:
createMessageBuilderin interfaceExternalConversationSystemAdapter- Returns:
- the
ExternalMessageBuilder
-
createTemplateMessageBuilder
Description copied from interface:WeChatExternalConversationSystemAdapterCreate a message builder for the WeChat template message.- Specified by:
createTemplateMessageBuilderin interfaceWeChatExternalConversationSystemAdapter- Returns:
- the template message builder
-
validateMessageContent
Description copied from interface:ExternalConversationSystemAdapterValidates the content of the message. If the content is invalid an exception should be thrown.- Specified by:
validateMessageContentin interfaceExternalConversationSystemAdapter- Parameters:
messageContent- the content of the message that should be validatedmessageCategory- the message category
-
fetchSupportedSendMessageTypes
- Specified by:
fetchSupportedSendMessageTypesin interfaceExternalConversationSystemAdapter- Returns:
- the types of messages that the adapter can send
-
convertAndCheckMessageSize
-
checkMessageSize
-
sendOutboundMessage
-
sendMessageDuringCommitting
-