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 Modifier and Type Field Description static String
SEND_DOCUMENT
static String
SEND_IMAGE
static String
SEND_REPLY
static String
SEND_VIDEO
static String
SEND_VOICE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExternalMessageBuilder
createMessageBuilder()
Creates theExternalMessageBuilder
that is responsible for constructing the external message for the give external user id.Collection<String>
fetchSupportedSendMessageTypes()
String
getExternalSystemId()
Returns the id of the external system implemented by this adapter.void
validateMessageContent(String messageContent, String messageCategory)
Validates the content of the message.
-
-
-
Field Detail
-
SEND_IMAGE
static final String SEND_IMAGE
- See Also:
- Constant Field Values
-
SEND_VIDEO
static final String SEND_VIDEO
- See Also:
- Constant Field Values
-
SEND_VOICE
static final String SEND_VOICE
- See Also:
- Constant Field Values
-
SEND_DOCUMENT
static final String SEND_DOCUMENT
- See Also:
- Constant Field Values
-
SEND_REPLY
static final String SEND_REPLY
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void validateMessageContent(String messageContent, String messageCategory)
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
-
-