public class DefaultGeocoderServiceManager extends Object implements GeocoderServiceManager
| Constructor and Description |
|---|
DefaultGeocoderServiceManager(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
GeocoderServiceManagerConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
GeocoderService |
getActiveGeocoderService()
Returns the current active
GeocoderService or null if none is active. |
GeocoderServiceManagerConfiguration |
getConfiguration()
Returns the configuration for the service manager
|
GeocoderService |
getGeocoderService(String geocoderId)
Returns the
GeocoderService identified by the provided geocoderId |
List<GeocoderService> |
getGeocoderServices()
Returns all registered
GeocoderService. |
void |
resetConfiguration()
Deletes all configuration files related to the geocoder service.
|
void |
updateConfiguration(GeocoderServiceManagerConfiguration newConfiguration)
Updates the configuration for the service manager
|
void |
updateGeocoderConfiguration(String geocoderId,
Map<String,Object> newProperties)
Updates the configuration for the
GeocoderService with the provided id. |
public DefaultGeocoderServiceManager(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.cm.ConfigurationAdmin configurationAdmin,
GeocoderServiceManagerConfiguration configuration)
public void resetConfiguration()
throws IOException
GeocoderServiceManagerresetConfiguration in interface GeocoderServiceManagerIOException - when deleting the configuration files failed.public void updateConfiguration(GeocoderServiceManagerConfiguration newConfiguration) throws IOException
GeocoderServiceManagerupdateConfiguration in interface GeocoderServiceManagerIOException - when writing the configuration file failedpublic GeocoderServiceManagerConfiguration getConfiguration()
GeocoderServiceManagergetConfiguration in interface GeocoderServiceManagerpublic GeocoderService getActiveGeocoderService()
GeocoderServiceManagerGeocoderService or null if none is active.getActiveGeocoderService in interface GeocoderServiceManagerGeocoderService or null if none is active.public List<GeocoderService> getGeocoderServices()
GeocoderServiceManagerGeocoderService. None of those may be activegetGeocoderServices in interface GeocoderServiceManagerGeocoderService.public void updateGeocoderConfiguration(String geocoderId, Map<String,Object> newProperties) throws IOException, GeocoderConfigurationException
GeocoderServiceManagerGeocoderService with the provided id.updateGeocoderConfiguration in interface GeocoderServiceManagergeocoderId - The id of the GeocoderService to updatenewProperties - The new configuration of the GeocoderServiceIOException - in case the configuration could not be persistedGeocoderConfigurationExceptionpublic GeocoderService getGeocoderService(String geocoderId)
GeocoderServiceManagerGeocoderService identified by the provided geocoderIdgetGeocoderService in interface GeocoderServiceManagergeocoderId - The id of the GeocoderService to return.GeocoderService identified by the provided geocoderIdCopyright © 2021. All rights reserved.