Package org.opennms.features.geocoder
Interface GeocoderServiceManager
-
- All Known Implementing Classes:
DefaultGeocoderServiceManager
public interface GeocoderServiceManager
Manager interface to the underlyingGeocoderService
s.- Author:
- mvrueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GeocoderService
getActiveGeocoderService()
Returns the current activeGeocoderService
or null if none is active.GeocoderServiceManagerConfiguration
getConfiguration()
Returns the configuration for the service managerGeocoderService
getGeocoderService(java.lang.String geocoderId)
Returns theGeocoderService
identified by the providedgeocoderId
java.util.List<GeocoderService>
getGeocoderServices()
Returns all registeredGeocoderService
.void
resetConfiguration()
Deletes all configuration files related to the geocoder service.void
updateConfiguration(GeocoderServiceManagerConfiguration configuration)
Updates the configuration for the service managervoid
updateGeocoderConfiguration(java.lang.String geocoderId, java.util.Map<java.lang.String,java.lang.Object> newProperties)
Updates the configuration for theGeocoderService
with the provided id.
-
-
-
Method Detail
-
resetConfiguration
void resetConfiguration() throws java.io.IOException
Deletes all configuration files related to the geocoder service. This results in falling back to the defaults- Throws:
java.io.IOException
- when deleting the configuration files failed.
-
updateConfiguration
void updateConfiguration(GeocoderServiceManagerConfiguration configuration) throws java.io.IOException
Updates the configuration for the service manager- Throws:
java.io.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 activeGeocoderService
or null if none is active.- Returns:
- the current active
GeocoderService
or null if none is active.
-
updateGeocoderConfiguration
void updateGeocoderConfiguration(java.lang.String geocoderId, java.util.Map<java.lang.String,java.lang.Object> newProperties) throws java.io.IOException, java.util.NoSuchElementException
Updates the configuration for theGeocoderService
with the provided id.- Parameters:
geocoderId
- The id of theGeocoderService
to updatenewProperties
- The new configuration of theGeocoderService
- Throws:
java.io.IOException
- in case the configuration could not be persistedjava.util.NoSuchElementException
- if aGeocoderService
witht he providedgeocoderId
does not exist.
-
getGeocoderServices
java.util.List<GeocoderService> getGeocoderServices()
Returns all registeredGeocoderService
. None of those may be active- Returns:
- all registered
GeocoderService
.
-
getGeocoderService
GeocoderService getGeocoderService(java.lang.String geocoderId) throws java.util.NoSuchElementException
Returns theGeocoderService
identified by the providedgeocoderId
- Parameters:
geocoderId
- The id of theGeocoderService
to return.- Returns:
- the
GeocoderService
identified by the providedgeocoderId
- Throws:
java.util.NoSuchElementException
- if theGeocoderService
with the providedgeocoderId
does not exist.
-
-