@Test public void testCreateConfigMap() throws Exception { JFastCGIPlugin plugin = new JFastCGIPlugin(); plugin.setConfiguration(conf); Map<String, Map<String, String>> configMap = plugin.createConfigMap(conf); assertThat(configMap).isNotNull(); assertThat(configMap).hasSize(5); assertThat(configMap.containsKey("DEFAULT")); assertThat(configMap.get("DEFAULT")).hasSize(2); assertThat(configMap.get("ACLUSTERCONFIG")).hasSize(1); assertThat(configMap.get("FILTERINGHEADERS")).hasSize(3); assertThat(configMap.get("CONTEXTOVERRIDEEXAMPLE")).hasSize(3); }
Map<String, Map<String, String>> createConfigMap(Properties configuration) { Set<Object> keys = configuration.keySet(); Map<String, Map<String, String>> configMap = new HashMap<String, Map<String, String>>(); for (Object key : keys) { Matcher matcher = configPattern.matcher(key.toString()); if (matcher.matches()) { String endpointName = matcher.group(1); String paramName = matcher.group(2); String value = configuration.getProperty((String) key); if (!configMap.containsKey(endpointName)) { configMap.put(endpointName, new HashMap<String, String>()); } configMap.get(endpointName).put(paramName, value); } } return configMap; }
JFastCGIPlugin extends PlayPlugin { Map<String, Map<String, String>> createConfigMap(Properties configuration) { Set<Object> keys = configuration.keySet(); Map<String, Map<String, String>> configMap = new HashMap<String, Map<String, String>>(); for (Object key : keys) { Matcher matcher = configPattern.matcher(key.toString()); if (matcher.matches()) { String endpointName = matcher.group(1); String paramName = matcher.group(2); String value = configuration.getProperty((String) key); if (!configMap.containsKey(endpointName)) { configMap.put(endpointName, new HashMap<String, String>()); } configMap.get(endpointName).put(paramName, value); } } return configMap; } }
JFastCGIPlugin extends PlayPlugin { Map<String, Map<String, String>> createConfigMap(Properties configuration) { Set<Object> keys = configuration.keySet(); Map<String, Map<String, String>> configMap = new HashMap<String, Map<String, String>>(); for (Object key : keys) { Matcher matcher = configPattern.matcher(key.toString()); if (matcher.matches()) { String endpointName = matcher.group(1); String paramName = matcher.group(2); String value = configuration.getProperty((String) key); if (!configMap.containsKey(endpointName)) { configMap.put(endpointName, new HashMap<String, String>()); } configMap.get(endpointName).put(paramName, value); } } return configMap; }  }
JFastCGIPlugin extends PlayPlugin { Map<String, Map<String, String>> createConfigMap(Properties configuration) { Set<Object> keys = configuration.keySet(); Map<String, Map<String, String>> configMap = new HashMap<String, Map<String, String>>(); for (Object key : keys) { Matcher matcher = configPattern.matcher(key.toString()); if (matcher.matches()) { String endpointName = matcher.group(1); String paramName = matcher.group(2); String value = configuration.getProperty((String) key); if (!configMap.containsKey(endpointName)) { configMap.put(endpointName, new HashMap<String, String>()); } configMap.get(endpointName).put(paramName, value); } } return configMap; }  @Override void onApplicationStart(); @Override void onApplicationStop(); void setConfiguration(Properties properties); }
JFastCGIPlugin extends PlayPlugin { Map<String, Map<String, String>> createConfigMap(Properties configuration) { Set<Object> keys = configuration.keySet(); Map<String, Map<String, String>> configMap = new HashMap<String, Map<String, String>>(); for (Object key : keys) { Matcher matcher = configPattern.matcher(key.toString()); if (matcher.matches()) { String endpointName = matcher.group(1); String paramName = matcher.group(2); String value = configuration.getProperty((String) key); if (!configMap.containsKey(endpointName)) { configMap.put(endpointName, new HashMap<String, String>()); } configMap.get(endpointName).put(paramName, value); } } return configMap; }  @Override void onApplicationStart(); @Override void onApplicationStop(); void setConfiguration(Properties properties);  }