Class WeChatTemplateMessageBuilderImpl
- java.lang.Object
-
- com.flowable.engage.external.system.wechat.WeChatTemplateMessageBuilderImpl
-
- All Implemented Interfaces:
WeChatTemplateMessageBuilder
public class WeChatTemplateMessageBuilderImpl extends Object implements WeChatTemplateMessageBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected WeChatOutboundTemplateMessageDto
templateMessage
protected WeChatJmsExternalConversationSystemAdapter
weChatJmsExternalConversationSystemAdapter
-
Constructor Summary
Constructors Constructor Description WeChatTemplateMessageBuilderImpl(WeChatJmsExternalConversationSystemAdapter weChatJmsExternalConversationSystemAdapter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeChatTemplateMessageBuilder
addTemplateTextParameter(String key, String value)
Add text parameter to the body.WeChatTemplateMessageBuilder
addTemplateTextParameters(Map<String,String> parameters)
Add text parameters to the body.WeChatTemplateMessageBuilder
businessAccountId(String businessAccountId)
The id of the business account that should be used when sending out the message.WeChatTemplateMessageBuilder
externalUserId(String externalUserId)
The id of the recipient of the message.WeChatTemplateMessageBuilder
messageId(String messageId)
The id of the reference message within the Engage system.void
send()
Perform the send of the template message.WeChatTemplateMessageBuilder
templateId(String templateId)
The id of the template that is registered on the WeChat side
-
-
-
Field Detail
-
weChatJmsExternalConversationSystemAdapter
protected final WeChatJmsExternalConversationSystemAdapter weChatJmsExternalConversationSystemAdapter
-
templateMessage
protected final WeChatOutboundTemplateMessageDto templateMessage
-
-
Constructor Detail
-
WeChatTemplateMessageBuilderImpl
public WeChatTemplateMessageBuilderImpl(WeChatJmsExternalConversationSystemAdapter weChatJmsExternalConversationSystemAdapter)
-
-
Method Detail
-
externalUserId
public WeChatTemplateMessageBuilder externalUserId(String externalUserId)
Description copied from interface:WeChatTemplateMessageBuilder
The id of the recipient of the message. This is the id of the user within the WeChat system.- Specified by:
externalUserId
in interfaceWeChatTemplateMessageBuilder
-
addTemplateTextParameters
public WeChatTemplateMessageBuilder addTemplateTextParameters(Map<String,String> parameters)
Description copied from interface:WeChatTemplateMessageBuilder
Add text parameters to the body.- Specified by:
addTemplateTextParameters
in interfaceWeChatTemplateMessageBuilder
-
addTemplateTextParameter
public WeChatTemplateMessageBuilder addTemplateTextParameter(String key, String value)
Description copied from interface:WeChatTemplateMessageBuilder
Add text parameter to the body.- Specified by:
addTemplateTextParameter
in interfaceWeChatTemplateMessageBuilder
- Parameters:
key
- the key of the placeholder which is used within the template messagevalue
- the value of the placeholder
-
templateId
public WeChatTemplateMessageBuilder templateId(String templateId)
Description copied from interface:WeChatTemplateMessageBuilder
The id of the template that is registered on the WeChat side- Specified by:
templateId
in interfaceWeChatTemplateMessageBuilder
-
messageId
public WeChatTemplateMessageBuilder messageId(String messageId)
Description copied from interface:WeChatTemplateMessageBuilder
The id of the reference message within the Engage system. It is used in order to correlate the WeChat message and the Engage message.- Specified by:
messageId
in interfaceWeChatTemplateMessageBuilder
-
businessAccountId
public WeChatTemplateMessageBuilder businessAccountId(String businessAccountId)
Description copied from interface:WeChatTemplateMessageBuilder
The id of the business account that should be used when sending out the message.- Specified by:
businessAccountId
in interfaceWeChatTemplateMessageBuilder
-
send
public void send()
Description copied from interface:WeChatTemplateMessageBuilder
Perform the send of the template message.- Specified by:
send
in interfaceWeChatTemplateMessageBuilder
-
-