AbstractWebService

public class AbstractWebService<T>

Abstract superclass for all webservice implementations.

Fields

NAME

protected static final String NAME

UUID

protected static final String UUID

Constructors

AbstractWebService

public AbstractWebService(RapidProHttpClient client)

Methods

getClient

protected RapidProHttpClient getClient()

getOneWithParams

protected T getOneWithParams(String key, String value, String endpoint, TypeReference typeRef)

Returns a matching instance of type T, if it exists.

Parameters:
  • key – The field of the RapidPro Entity
  • value – The value to be matched
  • endpoint – The RapidPro HTTP API endpoint
  • typeRef – The type reference for T
Throws:
  • WebServiceException
  • JsonUtilException
  • RapidProClientException
Returns:

One instance of type T.