OpenMRSLocationService¶
-
public interface
OpenMRSLocationService
¶ Interface for handling locations on the OpenMRS server.
Methods¶
createLocation¶
-
Location
createLocation
(String configName, Location location)¶ Creates the given
location
on the OpenMRS server. Configuration with the givenconfigName
will 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 givenconfigName
will 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
pageSize
locations fetched from the page with the givenpage
number. The list might contain less entries if the givenpage
is the last one and there is less thanpageSize
locations on it. Configuration with the givenconfigName
will 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 givenconfigName
will 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 givenconfigName
will 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
location
doesn’t exist