OpenMRSLocationService¶
-
public interface
OpenMRSLocationService¶ Interface for handling locations on the OpenMRS server.
Methods¶
createLocation¶
-
Location
createLocation(String configName, Location location)¶ Creates the given
locationon the OpenMRS server. Configuration with the givenconfigNamewill be used while performing this action.Parameters: - configName – the name of the configuration
- location – the location to be created
Returns: the created location
deleteLocation¶
getAllLocations¶
getLocationByUuid¶
-
Location
getLocationByUuid(String configName, String uuid)¶ Returns the location with the given
uuid. Configuration with the givenconfigNamewill be used while performing this action.Parameters: - configName – the name of the configuration
- uuid – the UUID of the location
Returns: the location with the given UUID
getLocations¶
-
List<Location>
getLocations(String configName, int page, int pageSize)¶ Returns a list of the locations. The returned list will contain maximum of
pageSizelocations fetched from the page with the givenpagenumber. The list might contain less entries if the givenpageis the last one and there is less thanpageSizelocations on it. Configuration with the givenconfigNamewill be used while performing this action.Parameters: - configName – the name of the configuration
- page – the number of the page
- pageSize – the size of the page
Returns: the list of locations on the given page
getLocations¶
-
List<Location>
getLocations(String configName, String locationName)¶ Returns a list of locations that have the given
locationName. Configuration with the givenconfigNamewill be used while performing this action.Parameters: - configName – the name of the configuration
- locationName – the name of the location
Returns: the list of matching locations
updateLocation¶
-
Location
updateLocation(String configName, Location location)¶ Updates the location with the information stored in the given
location. Configuration with the givenconfigNamewill be used while performing this action.Parameters: - configName – the name of the configuration
- location – the location to be used as an update source
Returns: the updated location, null if a location with the UUID given in the
locationdoesn’t exist