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 String
businessAccountId
protected String
content
protected String
contentType
protected Map<String,Object>
dynamicProperties
protected String
externalId
protected String
externalMediaId
protected String
externalMediaMimeType
protected String
externalMediaName
protected String
externalSenderId
protected String
externalSenderName
protected String
externalSystemId
protected InboundMessageHandlerImpl
inboundMessageHandler
protected String
interactiveOutcome
protected String
messageSubType
protected String
messageType
protected String
replyToExternalId
-
Constructor Summary
Constructors Constructor Description InboundMessageBuilderImpl(InboundMessageHandlerImpl inboundMessageHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundMessageBuilder
businessAccountId(String businessAccountId)
The id of the business account that has received the message.InboundMessageBuilder
content(String content)
The content of the messageInboundMessageBuilder
contentType(String contentType)
The type of the content for the message.InboundMessageBuilder
dynamicProperties(Map<String,Object> dynamicProperties)
possible extra information about the message.InboundMessageBuilder
externalId(String externalId)
The optional external id of the message in the external system.InboundMessageBuilder
externalMediaId(String externalMediaId)
The id of the external media.InboundMessageBuilder
externalMediaMimeType(String externalMediaMimeType)
The mime type of the external media.InboundMessageBuilder
externalMediaName(String externalMediaName)
The name of the external media.InboundMessageBuilder
externalSenderId(String externalSenderId)
The external id of the user that send the messageInboundMessageBuilder
externalSenderName(String externalSenderName)
InboundMessageBuilder
externalSystemId(String externalSystemId)
The id of the system that the message originates from.String
getBusinessAccountId()
String
getContent()
String
getContentType()
Map<String,Object>
getDynamicProperties()
String
getExternalId()
String
getExternalMediaId()
String
getExternalMediaMimeType()
String
getExternalMediaName()
String
getExternalSenderId()
String
getExternalSenderName()
String
getExternalSystemId()
String
getInteractiveOutcome()
An interactive event outcome value.String
getMessageSubType()
String
getMessageType()
String
getReplyToExternalId()
InboundMessageBuilder
interactiveOutcome(String interactiveOutcome)
An interactive event outcome value.InboundMessageBuilder
messageSubType(String messageSubType)
InboundMessageBuilder
messageType(String messageType)
InboundMessageBuilder
replyToExternalId(String replyToExternalId)
The optional reply to external id of the message in the external system.void
send()
Perform the actual message send to the engage platformvoid
sendUnsupported()
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:
getExternalSenderName
in interfaceInboundMessage
-
externalSenderName
public InboundMessageBuilder externalSenderName(String externalSenderName)
- Specified by:
externalSenderName
in interfaceInboundMessageBuilder
-
getExternalSenderId
public String getExternalSenderId()
- Specified by:
getExternalSenderId
in interfaceInboundMessage
-
externalSenderId
public InboundMessageBuilder externalSenderId(String externalSenderId)
Description copied from interface:InboundMessageBuilder
The external id of the user that send the message- Specified by:
externalSenderId
in interfaceInboundMessageBuilder
- Parameters:
externalSenderId
- the external id of the sender
-
getExternalSystemId
public String getExternalSystemId()
- Specified by:
getExternalSystemId
in interfaceInboundMessage
-
externalSystemId
public InboundMessageBuilder externalSystemId(String externalSystemId)
Description copied from interface:InboundMessageBuilder
The id of the system that the message originates from.- Specified by:
externalSystemId
in interfaceInboundMessageBuilder
- Parameters:
externalSystemId
- the system id- See Also:
ExternalSystemIds
-
getBusinessAccountId
public String getBusinessAccountId()
- Specified by:
getBusinessAccountId
in interfaceInboundMessage
-
businessAccountId
public InboundMessageBuilder businessAccountId(String businessAccountId)
Description copied from interface:InboundMessageBuilder
The id of the business account that has received the message. (e.g. WhatsApp business number, WeChat official account, etc)- Specified by:
businessAccountId
in interfaceInboundMessageBuilder
- Parameters:
businessAccountId
- the id of the business account
-
getExternalId
public String getExternalId()
- Specified by:
getExternalId
in interfaceInboundMessage
-
externalId
public InboundMessageBuilder externalId(String externalId)
Description copied from interface:InboundMessageBuilder
The optional external id of the message in the external system.- Specified by:
externalId
in interfaceInboundMessageBuilder
- Parameters:
externalId
- the external id
-
getReplyToExternalId
public String getReplyToExternalId()
- Specified by:
getReplyToExternalId
in interfaceInboundMessage
-
replyToExternalId
public InboundMessageBuilder replyToExternalId(String replyToExternalId)
Description copied from interface:InboundMessageBuilder
The 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:
replyToExternalId
in interfaceInboundMessageBuilder
- Parameters:
replyToExternalId
- the external id
-
getExternalMediaId
public String getExternalMediaId()
- Specified by:
getExternalMediaId
in interfaceInboundMessage
-
externalMediaId
public InboundMessageBuilder externalMediaId(String externalMediaId)
Description copied from interface:InboundMessageBuilder
The id of the external media.- Specified by:
externalMediaId
in interfaceInboundMessageBuilder
- Parameters:
externalMediaId
- the external media id
-
getExternalMediaName
public String getExternalMediaName()
- Specified by:
getExternalMediaName
in interfaceInboundMessage
-
externalMediaName
public InboundMessageBuilder externalMediaName(String externalMediaName)
Description copied from interface:InboundMessageBuilder
The name of the external media.- Specified by:
externalMediaName
in interfaceInboundMessageBuilder
- Parameters:
externalMediaName
- the external media name
-
getExternalMediaMimeType
public String getExternalMediaMimeType()
- Specified by:
getExternalMediaMimeType
in interfaceInboundMessage
-
externalMediaMimeType
public InboundMessageBuilder externalMediaMimeType(String externalMediaMimeType)
Description copied from interface:InboundMessageBuilder
The mime type of the external media.- Specified by:
externalMediaMimeType
in interfaceInboundMessageBuilder
- Parameters:
externalMediaMimeType
- the external media mime type
-
getMessageType
public String getMessageType()
- Specified by:
getMessageType
in interfaceInboundMessage
-
messageType
public InboundMessageBuilder messageType(String messageType)
- Specified by:
messageType
in interfaceInboundMessageBuilder
-
getMessageSubType
public String getMessageSubType()
- Specified by:
getMessageSubType
in interfaceInboundMessage
-
messageSubType
public InboundMessageBuilder messageSubType(String messageSubType)
- Specified by:
messageSubType
in interfaceInboundMessageBuilder
-
getInteractiveOutcome
public String getInteractiveOutcome()
Description copied from interface:InboundMessage
An 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:
getInteractiveOutcome
in interfaceInboundMessage
-
interactiveOutcome
public InboundMessageBuilder interactiveOutcome(String interactiveOutcome)
Description copied from interface:InboundMessageBuilder
An 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:
interactiveOutcome
in interfaceInboundMessageBuilder
- Parameters:
interactiveOutcome
- the interactive outcome value
-
getDynamicProperties
public Map<String,Object> getDynamicProperties()
- Specified by:
getDynamicProperties
in interfaceInboundMessage
-
dynamicProperties
public InboundMessageBuilder dynamicProperties(Map<String,Object> dynamicProperties)
Description copied from interface:InboundMessageBuilder
possible extra information about the message.- Specified by:
dynamicProperties
in interfaceInboundMessageBuilder
- Parameters:
dynamicProperties
- possible extra information about the message
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceInboundMessage
-
contentType
public InboundMessageBuilder contentType(String contentType)
Description copied from interface:InboundMessageBuilder
The type of the content for the message.- Specified by:
contentType
in interfaceInboundMessageBuilder
- Parameters:
contentType
- the message content type
-
getContent
public String getContent()
- Specified by:
getContent
in interfaceInboundMessage
-
content
public InboundMessageBuilder content(String content)
Description copied from interface:InboundMessageBuilder
The content of the message- Specified by:
content
in interfaceInboundMessageBuilder
- Parameters:
content
- the message content
-
send
public void send()
Description copied from interface:InboundMessageBuilder
Perform the actual message send to the engage platform- Specified by:
send
in interfaceInboundMessageBuilder
-
sendUnsupported
public void sendUnsupported()
Description copied from interface:InboundMessageBuilder
Perform sending the message as an unsupported type. This is usually decided by the invokers of the builders.- Specified by:
sendUnsupported
in interfaceInboundMessageBuilder
-
-