private String getConfiguration(ConfigKey pKey) { // TODO: Use fragments and/or configuration service if available. String value = bundleContext.getProperty(CONFIG_PREFIX + "." + pKey.getKeyValue()); if (value == null) { value = pKey.getDefaultValue(); } return value; }
// Customizer for registering servlet at a HttpService private Dictionary<String, String> getConfiguration() { Dictionary<String, String> config = new Hashtable<String, String>(); for (ConfigKey key : ConfigKey.values()) { String value = getConfiguration(key); if (value != null) { config.put(key.getKeyValue(), value); } } return config; }