Class InboundMessageBuilderImpl
- java.lang.Object
-
- com.flowable.engage.external.system.service.InboundMessageBuilderImpl
-
- All Implemented Interfaces:
InboundMessage,InboundMessageBuilder
public class InboundMessageBuilderImpl extends Object implements InboundMessageBuilder, InboundMessage
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbusinessAccountIdprotected Stringcontentprotected StringcontentTypeprotected Map<String,Object>dynamicPropertiesprotected StringexternalIdprotected StringexternalMediaIdprotected StringexternalMediaMimeTypeprotected StringexternalMediaNameprotected StringexternalSenderIdprotected StringexternalSenderNameprotected StringexternalSystemIdprotected InboundMessageHandlerImplinboundMessageHandlerprotected StringinteractiveOutcomeprotected StringmessageSubTypeprotected StringmessageTypeprotected StringreplyToExternalId
-
Constructor Summary
Constructors Constructor Description InboundMessageBuilderImpl(InboundMessageHandlerImpl inboundMessageHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundMessageBuilderbusinessAccountId(String businessAccountId)The id of the business account that has received the message.InboundMessageBuildercontent(String content)The content of the messageInboundMessageBuildercontentType(String contentType)The type of the content for the message.InboundMessageBuilderdynamicProperties(Map<String,Object> dynamicProperties)possible extra information about the message.InboundMessageBuilderexternalId(String externalId)The optional external id of the message in the external system.InboundMessageBuilderexternalMediaId(String externalMediaId)The id of the external media.InboundMessageBuilderexternalMediaMimeType(String externalMediaMimeType)The mime type of the external media.InboundMessageBuilderexternalMediaName(String externalMediaName)The name of the external media.InboundMessageBuilderexternalSenderId(String externalSenderId)The external id of the user that send the messageInboundMessageBuilderexternalSenderName(String externalSenderName)InboundMessageBuilderexternalSystemId(String externalSystemId)The id of the system that the message originates from.StringgetBusinessAccountId()StringgetContent()StringgetContentType()Map<String,Object>getDynamicProperties()StringgetExternalId()StringgetExternalMediaId()StringgetExternalMediaMimeType()StringgetExternalMediaName()StringgetExternalSenderId()StringgetExternalSenderName()StringgetExternalSystemId()StringgetInteractiveOutcome()An interactive event outcome value.StringgetMessageSubType()StringgetMessageType()StringgetReplyToExternalId()InboundMessageBuilderinteractiveOutcome(String interactiveOutcome)An interactive event outcome value.InboundMessageBuildermessageSubType(String messageSubType)InboundMessageBuildermessageType(String messageType)InboundMessageBuilderreplyToExternalId(String replyToExternalId)The optional reply to external id of the message in the external system.voidsend()Perform the actual message send to the engage platformvoidsendUnsupported()Perform sending the message as an unsupported type.
-
-
-
Field Detail
-
inboundMessageHandler
protected final InboundMessageHandlerImpl inboundMessageHandler
-
externalSenderName
protected String externalSenderName
-
externalSenderId
protected String externalSenderId
-
externalSystemId
protected String externalSystemId
-
businessAccountId
protected String businessAccountId
-
externalId
protected String externalId
-
replyToExternalId
protected String replyToExternalId
-
externalMediaId
protected String externalMediaId
-
externalMediaName
protected String externalMediaName
-
externalMediaMimeType
protected String externalMediaMimeType
-
messageType
protected String messageType
-
messageSubType
protected String messageSubType
-
content
protected String content
-
contentType
protected String contentType
-
interactiveOutcome
protected String interactiveOutcome
-
-
Constructor Detail
-
InboundMessageBuilderImpl
public InboundMessageBuilderImpl(InboundMessageHandlerImpl inboundMessageHandler)
-
-
Method Detail
-
getExternalSenderName
public String getExternalSenderName()
- Specified by:
getExternalSenderNamein interfaceInboundMessage
-
externalSenderName
public InboundMessageBuilder externalSenderName(String externalSenderName)
- Specified by:
externalSenderNamein interfaceInboundMessageBuilder
-
getExternalSenderId
public String getExternalSenderId()
- Specified by:
getExternalSenderIdin interfaceInboundMessage
-
externalSenderId
public InboundMessageBuilder externalSenderId(String externalSenderId)
Description copied from interface:InboundMessageBuilderThe external id of the user that send the message- Specified by:
externalSenderIdin interfaceInboundMessageBuilder- Parameters:
externalSenderId- the external id of the sender
-
getExternalSystemId
public String getExternalSystemId()
- Specified by:
getExternalSystemIdin interfaceInboundMessage
-
externalSystemId
public InboundMessageBuilder externalSystemId(String externalSystemId)
Description copied from interface:InboundMessageBuilderThe id of the system that the message originates from.- Specified by:
externalSystemIdin interfaceInboundMessageBuilder- Parameters:
externalSystemId- the system id- See Also:
ExternalSystemIds
-
getBusinessAccountId
public String getBusinessAccountId()
- Specified by:
getBusinessAccountIdin interfaceInboundMessage
-
businessAccountId
public InboundMessageBuilder businessAccountId(String businessAccountId)
Description copied from interface:InboundMessageBuilderThe id of the business account that has received the message. (e.g. WhatsApp business number, WeChat official account, etc)- Specified by:
businessAccountIdin interfaceInboundMessageBuilder- Parameters:
businessAccountId- the id of the business account
-
getExternalId
public String getExternalId()
- Specified by:
getExternalIdin interfaceInboundMessage
-
externalId
public InboundMessageBuilder externalId(String externalId)
Description copied from interface:InboundMessageBuilderThe optional external id of the message in the external system.- Specified by:
externalIdin interfaceInboundMessageBuilder- Parameters:
externalId- the external id
-
getReplyToExternalId
public String getReplyToExternalId()
- Specified by:
getReplyToExternalIdin interfaceInboundMessage
-
replyToExternalId
public InboundMessageBuilder replyToExternalId(String replyToExternalId)
Description copied from interface:InboundMessageBuilderThe optional reply to external id of the message in the external system. This would be used to create a reply to message in the engage system- Specified by:
replyToExternalIdin interfaceInboundMessageBuilder- Parameters:
replyToExternalId- the external id
-
getExternalMediaId
public String getExternalMediaId()
- Specified by:
getExternalMediaIdin interfaceInboundMessage
-
externalMediaId
public InboundMessageBuilder externalMediaId(String externalMediaId)
Description copied from interface:InboundMessageBuilderThe id of the external media.- Specified by:
externalMediaIdin interfaceInboundMessageBuilder- Parameters:
externalMediaId- the external media id
-
getExternalMediaName
public String getExternalMediaName()
- Specified by:
getExternalMediaNamein interfaceInboundMessage
-
externalMediaName
public InboundMessageBuilder externalMediaName(String externalMediaName)
Description copied from interface:InboundMessageBuilderThe name of the external media.- Specified by:
externalMediaNamein interfaceInboundMessageBuilder- Parameters:
externalMediaName- the external media name
-
getExternalMediaMimeType
public String getExternalMediaMimeType()
- Specified by:
getExternalMediaMimeTypein interfaceInboundMessage
-
externalMediaMimeType
public InboundMessageBuilder externalMediaMimeType(String externalMediaMimeType)
Description copied from interface:InboundMessageBuilderThe mime type of the external media.- Specified by:
externalMediaMimeTypein interfaceInboundMessageBuilder- Parameters:
externalMediaMimeType- the external media mime type
-
getMessageType
public String getMessageType()
- Specified by:
getMessageTypein interfaceInboundMessage
-
messageType
public InboundMessageBuilder messageType(String messageType)
- Specified by:
messageTypein interfaceInboundMessageBuilder
-
getMessageSubType
public String getMessageSubType()
- Specified by:
getMessageSubTypein interfaceInboundMessage
-
messageSubType
public InboundMessageBuilder messageSubType(String messageSubType)
- Specified by:
messageSubTypein interfaceInboundMessageBuilder
-
getInteractiveOutcome
public String getInteractiveOutcome()
Description copied from interface:InboundMessageAn interactive event outcome value. If this is set then an event registry event might be sent out when the message is routed to the conversation.- Specified by:
getInteractiveOutcomein interfaceInboundMessage
-
interactiveOutcome
public InboundMessageBuilder interactiveOutcome(String interactiveOutcome)
Description copied from interface:InboundMessageBuilderAn interactive event outcome value. If this is set then an event registry event might be sent out when the message is routed to the conversation.- Specified by:
interactiveOutcomein interfaceInboundMessageBuilder- Parameters:
interactiveOutcome- the interactive outcome value
-
getDynamicProperties
public Map<String,Object> getDynamicProperties()
- Specified by:
getDynamicPropertiesin interfaceInboundMessage
-
dynamicProperties
public InboundMessageBuilder dynamicProperties(Map<String,Object> dynamicProperties)
Description copied from interface:InboundMessageBuilderpossible extra information about the message.- Specified by:
dynamicPropertiesin interfaceInboundMessageBuilder- Parameters:
dynamicProperties- possible extra information about the message
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceInboundMessage
-
contentType
public InboundMessageBuilder contentType(String contentType)
Description copied from interface:InboundMessageBuilderThe type of the content for the message.- Specified by:
contentTypein interfaceInboundMessageBuilder- Parameters:
contentType- the message content type
-
getContent
public String getContent()
- Specified by:
getContentin interfaceInboundMessage
-
content
public InboundMessageBuilder content(String content)
Description copied from interface:InboundMessageBuilderThe content of the message- Specified by:
contentin interfaceInboundMessageBuilder- Parameters:
content- the message content
-
send
public void send()
Description copied from interface:InboundMessageBuilderPerform the actual message send to the engage platform- Specified by:
sendin interfaceInboundMessageBuilder
-
sendUnsupported
public void sendUnsupported()
Description copied from interface:InboundMessageBuilderPerform sending the message as an unsupported type. This is usually decided by the invokers of the builders.- Specified by:
sendUnsupportedin interfaceInboundMessageBuilder
-
-