Interface ExternalConversationSystemAdapter
-
- All Known Subinterfaces:
LineExternalConversationSystemAdapter,WeChatExternalConversationSystemAdapter,WhatsAppExternalConversationSystemAdapter
- All Known Implementing Classes:
LineJmsExternalConversationSystemAdapter,WeChatJmsExternalConversationSystemAdapter,WhatsAppJmsExternalConversationSystemAdapter
public interface ExternalConversationSystemAdapterInterface 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 StringSEND_DOCUMENTstatic StringSEND_IMAGEstatic StringSEND_REPLYstatic StringSEND_VIDEOstatic StringSEND_VOICE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExternalMessageBuildercreateMessageBuilder()Creates theExternalMessageBuilderthat is responsible for constructing the external message for the give external user id.Collection<String>fetchSupportedSendMessageTypes()StringgetExternalSystemId()Returns the id of the external system implemented by this adapter.voidvalidateMessageContent(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 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.- 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
-
-