Class WhatsAppContactVerificationResponseEventHandler
java.lang.Object
com.flowable.engage.external.system.whatsapp.event.WhatsAppContactVerificationResponseEventHandler
- All Implemented Interfaces:
WhatsAppInboundEventHandler
public class WhatsAppContactVerificationResponseEventHandler extends java.lang.Object implements WhatsAppInboundEventHandler
- Author:
- Filip Hrisafov
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected org.flowable.engine.RuntimeService
runtimeService
static java.lang.String
VERIFICATION_CONTACT_ERROR_PARAMETER
static java.lang.String
VERIFICATION_CONTACT_ERRORS_PARAMETER
static java.lang.String
VERIFICATION_CONTACT_PARAMETER
static java.lang.String
VERIFICATION_CONTACTS_PARAMETER
-
Constructor Summary
Constructors Constructor Description WhatsAppContactVerificationResponseEventHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.flowable.engine.RuntimeService runtimeService)
-
Method Summary
Modifier and Type Method Description protected void
bpmnVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
protected com.fasterxml.jackson.databind.JsonNode
createContactsVariable(java.util.Collection<WhatsAppContactVerificationResponse.ContactDto> contacts)
protected com.fasterxml.jackson.databind.JsonNode
createContactVariable(WhatsAppContactVerificationResponse.ContactDto contact)
protected com.fasterxml.jackson.databind.JsonNode
createErrorsVariable(java.util.Collection<InboundStatusDto.ErrorDto> errors)
protected com.fasterxml.jackson.databind.JsonNode
createErrorVariable(InboundStatusDto.ErrorDto error)
protected java.util.Map<java.lang.String,java.lang.Object>
extractVariables(WhatsAppContactVerificationResponse verificationResponse)
java.lang.String
getType()
The type of the event that this handler handles.void
process(com.fasterxml.jackson.databind.JsonNode eventPayload)
Process the event payload.protected void
unsupportedVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
protected void
verificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
-
Field Details
-
VERIFICATION_CONTACT_PARAMETER
public static final java.lang.String VERIFICATION_CONTACT_PARAMETER- See Also:
- Constant Field Values
-
VERIFICATION_CONTACTS_PARAMETER
public static final java.lang.String VERIFICATION_CONTACTS_PARAMETER- See Also:
- Constant Field Values
-
VERIFICATION_CONTACT_ERROR_PARAMETER
public static final java.lang.String VERIFICATION_CONTACT_ERROR_PARAMETER- See Also:
- Constant Field Values
-
VERIFICATION_CONTACT_ERRORS_PARAMETER
public static final java.lang.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 org.flowable.engine.RuntimeService runtimeService
-
-
Constructor Details
-
WhatsAppContactVerificationResponseEventHandler
public WhatsAppContactVerificationResponseEventHandler(com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.flowable.engine.RuntimeService runtimeService)
-
-
Method Details
-
getType
public java.lang.String getType()Description copied from interface:WhatsAppInboundEventHandler
The type of the event that this handler handles.- Specified by:
getType
in interfaceWhatsAppInboundEventHandler
- Returns:
- the type of the event that is handled
-
process
public void process(com.fasterxml.jackson.databind.JsonNode eventPayload)Description copied from interface:WhatsAppInboundEventHandler
Process the event payload.- Specified by:
process
in 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 java.util.Map<java.lang.String,java.lang.Object> extractVariables(WhatsAppContactVerificationResponse verificationResponse) -
createContactVariable
protected com.fasterxml.jackson.databind.JsonNode createContactVariable(WhatsAppContactVerificationResponse.ContactDto contact) -
createContactsVariable
protected com.fasterxml.jackson.databind.JsonNode createContactsVariable(java.util.Collection<WhatsAppContactVerificationResponse.ContactDto> contacts) -
createErrorVariable
protected com.fasterxml.jackson.databind.JsonNode createErrorVariable(InboundStatusDto.ErrorDto error) -
createErrorsVariable
protected com.fasterxml.jackson.databind.JsonNode createErrorsVariable(java.util.Collection<InboundStatusDto.ErrorDto> errors)
-