ContactMapperService

public interface ContactMapperService

Service interface for CRUD operations on ContactMapping

Methods

create

void create(String externalId, UUID rapidproUUID)

Creates a new mapping from an external ID to a Rapidpro UUID.

Parameters:
  • externalId – The external ID mapping to a Rapidpro UUID.
  • rapidproUUID – The Rapidpro UUID.

delete

void delete(String externalId)

Deletes the ContactMapper if it exists.

Parameters:
  • externalId – The external ID mapping to a Rapidpro UUID.
Throws:
  • NoMappingException – If no mapping from an External ID to a Rapidpro UUID exists.

exists

boolean exists(String externalId)

Checks if a mapping exists from an external ID to a Rapidpro UUID.

Parameters:
  • externalId – The external ID mapping to a Rapidpro UUID.
Returns:

True if a mapping exists, False otherwise.

getRapidproUUIDFromExternalId

UUID getRapidproUUIDFromExternalId(String externalId)

Provides the Rapidpro UUID for the contact from the External ID.

Parameters:
  • externalId – The external ID mapping to a Rapidpro UUID.
Throws:
  • NoMappingException – If no mapping from an External ID to a Rapidpro UUID exists.
Returns:

The Contact UUID, if it exists.