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.Logger
logger
protected com.fasterxml.jackson.databind.ObjectMapper
objectMapper
protected RuntimeService
runtimeService
static String
VERIFICATION_CONTACT_ERROR_PARAMETER
static String
VERIFICATION_CONTACT_ERRORS_PARAMETER
static String
VERIFICATION_CONTACT_PARAMETER
static String
VERIFICATION_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 void
bpmnVerificationResponseReceived(WhatsAppContactVerificationResponse verificationResponse)
protected com.fasterxml.jackson.databind.JsonNode
createContactsVariable(Collection<WhatsAppContactVerificationResponse.ContactDto> contacts)
protected com.fasterxml.jackson.databind.JsonNode
createContactVariable(WhatsAppContactVerificationResponse.ContactDto contact)
protected com.fasterxml.jackson.databind.JsonNode
createErrorsVariable(Collection<InboundStatusDto.ErrorDto> errors)
protected com.fasterxml.jackson.databind.JsonNode
createErrorVariable(InboundStatusDto.ErrorDto error)
protected Map<String,Object>
extractVariables(WhatsAppContactVerificationResponse verificationResponse)
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 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: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 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)
-
-