Class WhatsAppContactVerificationResponseEventHandler
- java.lang.Object
-
- com.flowable.engage.external.system.whatsapp.event.WhatsAppContactVerificationResponseEventHandler
-
- All Implemented Interfaces:
WhatsAppInboundEventHandler
public class WhatsAppContactVerificationResponseEventHandler extends Object implements WhatsAppInboundEventHandler
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerloggerprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapperprotected RuntimeServiceruntimeServicestatic StringVERIFICATION_CONTACT_ERROR_PARAMETERstatic StringVERIFICATION_CONTACT_ERRORS_PARAMETERstatic StringVERIFICATION_CONTACT_PARAMETERstatic StringVERIFICATION_CONTACTS_PARAMETER
-
Constructor Summary
Constructors Constructor Description WhatsAppContactVerificationResponseEventHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, RuntimeService runtimeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbpmnVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)protected com.fasterxml.jackson.databind.JsonNodecreateContactsVariable(Collection<WhatsAppContactVerificationResponse.ContactDto> contacts)protected com.fasterxml.jackson.databind.JsonNodecreateContactVariable(WhatsAppContactVerificationResponse.ContactDto contact)protected com.fasterxml.jackson.databind.JsonNodecreateErrorsVariable(Collection<InboundStatusDto.ErrorDto> errors)protected com.fasterxml.jackson.databind.JsonNodecreateErrorVariable(InboundStatusDto.ErrorDto error)protected Map<String,Object>extractVariables(WhatsAppContactVerificationResponse verificationResponse)StringgetType()The type of the event that this handler handles.voidprocess(com.fasterxml.jackson.databind.JsonNode eventPayload)Process the event payload.protected voidunsupportedVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)protected voidverificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
-
-
-
Field Detail
-
VERIFICATION_CONTACT_PARAMETER
public static final String VERIFICATION_CONTACT_PARAMETER
- See Also:
- Constant Field Values
-
VERIFICATION_CONTACTS_PARAMETER
public static final String VERIFICATION_CONTACTS_PARAMETER
- See Also:
- Constant Field Values
-
VERIFICATION_CONTACT_ERROR_PARAMETER
public static final String VERIFICATION_CONTACT_ERROR_PARAMETER
- See Also:
- Constant Field Values
-
VERIFICATION_CONTACT_ERRORS_PARAMETER
public static final String VERIFICATION_CONTACT_ERRORS_PARAMETER
- See Also:
- Constant Field Values
-
logger
protected final org.slf4j.Logger logger
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
runtimeService
protected final RuntimeService runtimeService
-
-
Constructor Detail
-
WhatsAppContactVerificationResponseEventHandler
public WhatsAppContactVerificationResponseEventHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, RuntimeService runtimeService)
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:WhatsAppInboundEventHandlerThe type of the event that this handler handles.- Specified by:
getTypein interfaceWhatsAppInboundEventHandler- Returns:
- the type of the event that is handled
-
process
public void process(com.fasterxml.jackson.databind.JsonNode eventPayload)
Description copied from interface:WhatsAppInboundEventHandlerProcess the event payload.- Specified by:
processin interfaceWhatsAppInboundEventHandler- Parameters:
eventPayload- the payload of the event
-
verificationResponseReceived
protected void verificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
-
bpmnVerificationResponseReceived
protected void bpmnVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
-
unsupportedVerificationResponseReceived
protected void unsupportedVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
-
extractVariables
protected Map<String,Object> extractVariables(WhatsAppContactVerificationResponse verificationResponse)
-
createContactVariable
protected com.fasterxml.jackson.databind.JsonNode createContactVariable(WhatsAppContactVerificationResponse.ContactDto contact)
-
createContactsVariable
protected com.fasterxml.jackson.databind.JsonNode createContactsVariable(Collection<WhatsAppContactVerificationResponse.ContactDto> contacts)
-
createErrorVariable
protected com.fasterxml.jackson.databind.JsonNode createErrorVariable(InboundStatusDto.ErrorDto error)
-
createErrorsVariable
protected com.fasterxml.jackson.databind.JsonNode createErrorsVariable(Collection<InboundStatusDto.ErrorDto> errors)
-
-