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
GeocoderServiceManager
resetConfiguration
in interface GeocoderServiceManager
IOException
- when deleting the configuration files failed.public void updateConfiguration(GeocoderServiceManagerConfiguration newConfiguration) throws IOException
GeocoderServiceManager
updateConfiguration
in interface GeocoderServiceManager
IOException
- when writing the configuration file failedpublic GeocoderServiceManagerConfiguration getConfiguration()
GeocoderServiceManager
getConfiguration
in interface GeocoderServiceManager
public GeocoderService getActiveGeocoderService()
GeocoderServiceManager
GeocoderService
or null if none is active.getActiveGeocoderService
in interface GeocoderServiceManager
GeocoderService
or null if none is active.public List<GeocoderService> getGeocoderServices()
GeocoderServiceManager
GeocoderService
. None of those may be activegetGeocoderServices
in interface GeocoderServiceManager
GeocoderService
.public void updateGeocoderConfiguration(String geocoderId, Map<String,Object> newProperties) throws IOException, GeocoderConfigurationException
GeocoderServiceManager
GeocoderService
with the provided id.updateGeocoderConfiguration
in interface GeocoderServiceManager
geocoderId
- The id of the GeocoderService
to updatenewProperties
- The new configuration of the GeocoderService
IOException
- in case the configuration could not be persistedGeocoderConfigurationException
public GeocoderService getGeocoderService(String geocoderId)
GeocoderServiceManager
GeocoderService
identified by the provided geocoderId
getGeocoderService
in interface GeocoderServiceManager
geocoderId
- The id of the GeocoderService
to return.GeocoderService
identified by the provided geocoderId
Copyright © 2021. All rights reserved.