CommcareLocationService

public interface CommcareLocationService

A service to perform queries against CommCareHQ location APIs.

Methods

getCommcareLocationById

CommcareLocation getCommcareLocationById(String id, String configName)

Retrieves the CommCare location, based on the id and provided configuration name. If name is not set, the default configuration will be used.

Parameters:
  • id – id of the location
  • configName – name of the configuration
Returns:

location, retrieved from the CommCare server

getCommcareLocationById

CommcareLocation getCommcareLocationById(String id)

Retrieves the CommCare location, based on the id. It uses default configuration.

Parameters:
  • id – id of the location
Returns:

location, retrieved from the CommCare server

getCommcareLocations

List<CommcareLocation> getCommcareLocations(Integer pageSize, Integer pageNumber, String configName)

Retrieves a list of locations, based on provided parameters and configuration name.

Parameters:
  • pageSize – amount of instances to fetch per page
  • pageNumber – the page number
  • configName – name of the configuration
Returns:

a list of loctions, retrieved from the CommCare server

getCommcareLocations

List<CommcareLocation> getCommcareLocations(Integer pageSize, Integer pageNumber)

Retrieves a list of locations, based on provided parameters. It uses default configuration.

Parameters:
  • pageSize – amount of instances to fetch per page
  • pageNumber – the page number
Returns:

a list of loctions, retrieved from the CommCare server