Interface ExternalConversationSystemAdapter
- All Known Subinterfaces:
LineExternalConversationSystemAdapter
,WeChatExternalConversationSystemAdapter
,WhatsAppExternalConversationSystemAdapter
- All Known Implementing Classes:
LineJmsExternalConversationSystemAdapter
,WeChatJmsExternalConversationSystemAdapter
,WhatsAppJmsExternalConversationSystemAdapter
public interface ExternalConversationSystemAdapter
Interface that needs to be implemented by an external conversation system provider. For example
for sending a message to WeChat, Whatsapp or Facebook
- Author:
- Filip Hrisafov
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCreates theExternalMessageBuilder
that is responsible for constructing the external message for the give external user id.Returns the id of the external system implemented by this adapter.void
validateMessageContent
(String messageContent, String messageCategory) Validates the content of the message.
-
Field Details
-
SEND_IMAGE
- See Also:
-
SEND_VIDEO
- See Also:
-
SEND_VOICE
- See Also:
-
SEND_DOCUMENT
- See Also:
-
SEND_REPLY
- See Also:
-
-
Method Details
-
getExternalSystemId
String getExternalSystemId()Returns the id of the external system implemented by this adapter.- Returns:
- the external system id implemented by this adapter
-
createMessageBuilder
ExternalMessageBuilder createMessageBuilder()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.- Returns:
- the
ExternalMessageBuilder
-
validateMessageContent
Validates the content of the message. If the content is invalid an exception should be thrown.- Parameters:
messageContent
- the content of the message that should be validatedmessageCategory
- the message category
-
fetchSupportedSendMessageTypes
Collection<String> fetchSupportedSendMessageTypes()- Returns:
- the types of messages that the adapter can send
-