Class WhatsAppTemplateMessageBuilderImpl
java.lang.Object
com.flowable.engage.external.system.whatsapp.WhatsAppTemplateMessageBuilderImpl
- All Implemented Interfaces:
WhatsAppTemplateMessageBuilder
public class WhatsAppTemplateMessageBuilderImpl
extends Object
implements WhatsAppTemplateMessageBuilder
- Author:
- Filip Hrisafov, Anatolii Balakiriev
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classprotected static enumNested classes/interfaces inherited from interface com.flowable.engage.external.system.whatsapp.api.WhatsAppTemplateMessageBuilder
WhatsAppTemplateMessageBuilder.ButtonComponentBuilder, WhatsAppTemplateMessageBuilder.ComponentBuilder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final WhatsAppOutboundTemplateMessageDtoprotected final WhatsAppJmsExternalConversationSystemAdapter -
Constructor Summary
ConstructorsConstructorDescriptionWhatsAppTemplateMessageBuilderImpl(WhatsAppJmsExternalConversationSystemAdapter whatsAppJmsExternalConversationSystemAdapter) -
Method Summary
Modifier and TypeMethodDescriptionaddTemplateTextParameter(String parameter) Add a positional text parameter to the body.addTemplateTextParameters(Collection<String> parameters) Add positional text parameters to the body.body()Initiates creation of the body.businessAccountId(String businessAccountId) The id of the business account that should be used when sending out the message.button()Initiates creation of the button.externalUserId(String externalUserId) The id of the recipient of the message.footer()Initiates creation of the footer.header()Initiates creation of the header.The language of the template that should be used.mediaHeader(String mediaId) The content item ID for the media header.The id of the reference message within the Engage system.voidsend()Perform the send of the template message.templateId(String templateId) The id of the template that is registered on the WhatsApp sidetimeToLive(Duration timeToLive) Time To Live (TTL) duration.
-
Field Details
-
whatsAppJmsExternalConversationSystemAdapter
protected final WhatsAppJmsExternalConversationSystemAdapter whatsAppJmsExternalConversationSystemAdapter -
templateMessage
-
-
Constructor Details
-
WhatsAppTemplateMessageBuilderImpl
public WhatsAppTemplateMessageBuilderImpl(WhatsAppJmsExternalConversationSystemAdapter whatsAppJmsExternalConversationSystemAdapter)
-
-
Method Details
-
timeToLive
Description copied from interface:WhatsAppTemplateMessageBuilderTime To Live (TTL) duration.- Specified by:
timeToLivein interfaceWhatsAppTemplateMessageBuilder
-
templateId
Description copied from interface:WhatsAppTemplateMessageBuilderThe id of the template that is registered on the WhatsApp side- Specified by:
templateIdin interfaceWhatsAppTemplateMessageBuilder
-
language
Description copied from interface:WhatsAppTemplateMessageBuilderThe language of the template that should be used.- Specified by:
languagein interfaceWhatsAppTemplateMessageBuilder
-
addTemplateTextParameter
Description copied from interface:WhatsAppTemplateMessageBuilderAdd a positional text parameter to the body.Short circuit for calling
WhatsAppTemplateMessageBuilder.body(), thenWhatsAppTemplateMessageBuilder.ComponentBuilder.addTextParameter(String)and thenWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()Note: The parameter must be added in the correct order according to the template message.
- Specified by:
addTemplateTextParameterin interfaceWhatsAppTemplateMessageBuilder
-
addTemplateTextParameters
Description copied from interface:WhatsAppTemplateMessageBuilderAdd positional text parameters to the body.Short circuit for calling
WhatsAppTemplateMessageBuilder.body(), thenWhatsAppTemplateMessageBuilder.ComponentBuilder.addTextParameter(String)and thenWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()Note: The parameters must be added in the correct order according to the template message.
- Specified by:
addTemplateTextParametersin interfaceWhatsAppTemplateMessageBuilder
-
externalUserId
Description copied from interface:WhatsAppTemplateMessageBuilderThe id of the recipient of the message. This is the id of the user within the WhatsApp system.- Specified by:
externalUserIdin interfaceWhatsAppTemplateMessageBuilder
-
businessAccountId
Description copied from interface:WhatsAppTemplateMessageBuilderThe id of the business account that should be used when sending out the message.- Specified by:
businessAccountIdin interfaceWhatsAppTemplateMessageBuilder
-
messageId
Description copied from interface:WhatsAppTemplateMessageBuilderThe id of the reference message within the Engage system. It is used in order to correlate the WhatsApp message and the Engage message.- Specified by:
messageIdin interfaceWhatsAppTemplateMessageBuilder
-
send
public void send()Description copied from interface:WhatsAppTemplateMessageBuilderPerform the send of the template message.- Specified by:
sendin interfaceWhatsAppTemplateMessageBuilder
-
header
Description copied from interface:WhatsAppTemplateMessageBuilderInitiates creation of the header. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Specified by:
headerin interfaceWhatsAppTemplateMessageBuilder- Returns:
- header-specific builder.
-
mediaHeader
Description copied from interface:WhatsAppTemplateMessageBuilderThe content item ID for the media header.- Specified by:
mediaHeaderin interfaceWhatsAppTemplateMessageBuilder- Parameters:
mediaId- the media header
-
body
Description copied from interface:WhatsAppTemplateMessageBuilderInitiates creation of the body. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Specified by:
bodyin interfaceWhatsAppTemplateMessageBuilder- Returns:
- body-specific builder.
-
button
Description copied from interface:WhatsAppTemplateMessageBuilderInitiates creation of the button. After you are done building this component - callWhatsAppTemplateMessageBuilder.ComponentBuilder.buildComponent()method to build and add it to the parent builder.- Specified by:
buttonin interfaceWhatsAppTemplateMessageBuilder- Returns:
- button-specific builder.
-