Package org.opennms.features.geocoder
Interface GeocoderServiceManager
-
- All Known Implementing Classes:
DefaultGeocoderServiceManager
public interface GeocoderServiceManagerManager interface to the underlyingGeocoderServices.- Author:
- mvrueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GeocoderServicegetActiveGeocoderService()Returns the current activeGeocoderServiceor null if none is active.GeocoderServiceManagerConfigurationgetConfiguration()Returns the configuration for the service managerGeocoderServicegetGeocoderService(String geocoderId)Returns theGeocoderServiceidentified by the providedgeocoderIdList<GeocoderService>getGeocoderServices()Returns all registeredGeocoderService.voidresetConfiguration()Deletes all configuration files related to the geocoder service.voidupdateConfiguration(GeocoderServiceManagerConfiguration configuration)Updates the configuration for the service managervoidupdateGeocoderConfiguration(String geocoderId, Map<String,Object> newProperties)Updates the configuration for theGeocoderServicewith the provided id.
-
-
-
Method Detail
-
resetConfiguration
void resetConfiguration() throws IOExceptionDeletes all configuration files related to the geocoder service. This results in falling back to the defaults- Throws:
IOException- when deleting the configuration files failed.
-
updateConfiguration
void updateConfiguration(GeocoderServiceManagerConfiguration configuration) throws IOException
Updates the configuration for the service manager- Throws:
IOException- when writing the configuration file failed
-
getConfiguration
GeocoderServiceManagerConfiguration getConfiguration()
Returns the configuration for the service manager- Returns:
- the configuration for the service manager
-
getActiveGeocoderService
GeocoderService getActiveGeocoderService()
Returns the current activeGeocoderServiceor null if none is active.- Returns:
- the current active
GeocoderServiceor null if none is active.
-
updateGeocoderConfiguration
void updateGeocoderConfiguration(String geocoderId, Map<String,Object> newProperties) throws IOException, NoSuchElementException
Updates the configuration for theGeocoderServicewith the provided id.- Parameters:
geocoderId- The id of theGeocoderServiceto updatenewProperties- The new configuration of theGeocoderService- Throws:
IOException- in case the configuration could not be persistedNoSuchElementException- if aGeocoderServicewitht he providedgeocoderIddoes not exist.
-
getGeocoderServices
List<GeocoderService> getGeocoderServices()
Returns all registeredGeocoderService. None of those may be active- Returns:
- all registered
GeocoderService.
-
getGeocoderService
GeocoderService getGeocoderService(String geocoderId) throws NoSuchElementException
Returns theGeocoderServiceidentified by the providedgeocoderId- Parameters:
geocoderId- The id of theGeocoderServiceto return.- Returns:
- the
GeocoderServiceidentified by the providedgeocoderId - Throws:
NoSuchElementException- if theGeocoderServicewith the providedgeocoderIddoes not exist.
-
-