/** * Update this global configuration from a string-string. Only the known keys are taken * from this map * * @param pConfig config map from where to take the configuration */ public void updateGlobalConfiguration(Map<String, String> pConfig) { for (ConfigKey c : ConfigKey.values()) { if (c.isGlobalConfig()) { String value = pConfig.get(c.getKeyValue()); if (value != null) { globalConfig.put(c,value); } } } }
private JSONObject configToJSONObject() { JSONObject info = new JSONObject(); if (config != null) { for (ConfigKey key : ConfigKey.values()) { if (key.isGlobalConfig()) { String value = config.get(key); if (value != null) { info.put(key.getKeyValue(), value); } } } } return info; }
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); } } String jolokiaId = NetworkUtil.replaceExpression(config.get(ConfigKey.AGENT_ID.getKeyValue())); if (jolokiaId == null) { config.put(ConfigKey.AGENT_ID.getKeyValue(), NetworkUtil.getAgentId(hashCode(),"osgi")); } config.put(ConfigKey.AGENT_TYPE.getKeyValue(),"osgi"); return config; }
public static boolean containsEnum(String test) { for (ConfigKey c : ConfigKey.values()) { if (c.getKeyValue().equals(test)) { return true; } } return false; }
/** * Update this global configuration from a string-string. Only the known keys are taken * from this map * * @param pConfig config map from where to take the configuration */ public void updateGlobalConfiguration(Map<String, String> pConfig) { for (ConfigKey c : ConfigKey.values()) { if (c.isGlobalConfig()) { String value = pConfig.get(c.getKeyValue()); if (value != null) { globalConfig.put(c,value); } } } }
/** * Update this global configuration from a string-string. Only the known keys are taken * from this map * * @param pConfig config map from where to take the configuration */ public void updateGlobalConfiguration(Map<String, String> pConfig) { for (ConfigKey c : ConfigKey.values()) { if (c.isGlobalConfig()) { String value = pConfig.get(c.getKeyValue()); if (value != null) { globalConfig.put(c,value); } } } }
private JSONObject configToJSONObject() { JSONObject info = new JSONObject(); if (config != null) { for (ConfigKey key : ConfigKey.values()) { if (key.isGlobalConfig()) { String value = config.get(key); if (value != null) { info.put(key.getKeyValue(), value); } } } } return info; }
private JSONObject configToJSONObject() { JSONObject info = new JSONObject(); if (config != null) { for (ConfigKey key : ConfigKey.values()) { if (key.isGlobalConfig()) { String value = config.get(key); if (value != null) { info.put(key.getKeyValue(), value); } } } } return info; }
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); } } String jolokiaId = NetworkUtil.replaceExpression(config.get(ConfigKey.AGENT_ID.getKeyValue())); if (jolokiaId == null) { config.put(ConfigKey.AGENT_ID.getKeyValue(), NetworkUtil.getAgentId(hashCode(),"osgi")); } config.put(ConfigKey.AGENT_TYPE.getKeyValue(),"osgi"); return config; }