@Test public void testGeneration() throws IOException { CreateBlurServerSetupHtmlPage.main(new String[] { source.getAbsolutePath(), dest.getAbsolutePath() }); Properties defaultProperties = new Properties(); defaultProperties.load(CreateBlurServerSetupHtmlPageTest.class.getResourceAsStream("/blur-default.properties")); int numProps = defaultProperties.size(); int numDocumentedProps = getDocumentedProps(); assertEquals(numProps, numDocumentedProps); }
public static void main(String[] args) throws IOException { BlurPropertyParser parser = new BlurPropertyParser(); Map<String, List<BlurProp>> props = parser.parse(); Map<String, StringBuffer> map = new HashMap<String, StringBuffer>(); for (Map.Entry<String, List<BlurProp>> prop : props.entrySet()) { StringBuffer buffer = map.get(prop.getKey()); if (buffer == null) { buffer = new StringBuffer(); map.put(prop.getKey(), buffer); } for (BlurProp p : prop.getValue()) { buffer.append("<tr><td>").append(p.getName()); if (!p.getDefaultVal().trim().isEmpty()) { buffer.append(" (").append(p.getDefaultVal()).append(")"); } buffer.append("</td><td>").append(p.getDescription()).append("</td></tr>"); } } String source = args[0]; String dest = args[1]; replaceValuesInFile(source, dest, map); }
CreateBlurServerSetupHtmlPage { public static void main(String[] args) throws IOException { BlurPropertyParser parser = new BlurPropertyParser(); Map<String, List<BlurProp>> props = parser.parse(); Map<String, StringBuffer> map = new HashMap<String, StringBuffer>(); for (Map.Entry<String, List<BlurProp>> prop : props.entrySet()) { StringBuffer buffer = map.get(prop.getKey()); if (buffer == null) { buffer = new StringBuffer(); map.put(prop.getKey(), buffer); } for (BlurProp p : prop.getValue()) { buffer.append("<tr><td>").append(p.getName()); if (!p.getDefaultVal().trim().isEmpty()) { buffer.append(" (").append(p.getDefaultVal()).append(")"); } buffer.append("</td><td>").append(p.getDescription()).append("</td></tr>"); } } String source = args[0]; String dest = args[1]; replaceValuesInFile(source, dest, map); } }
CreateBlurServerSetupHtmlPage { public static void main(String[] args) throws IOException { BlurPropertyParser parser = new BlurPropertyParser(); Map<String, List<BlurProp>> props = parser.parse(); Map<String, StringBuffer> map = new HashMap<String, StringBuffer>(); for (Map.Entry<String, List<BlurProp>> prop : props.entrySet()) { StringBuffer buffer = map.get(prop.getKey()); if (buffer == null) { buffer = new StringBuffer(); map.put(prop.getKey(), buffer); } for (BlurProp p : prop.getValue()) { buffer.append("<tr><td>").append(p.getName()); if (!p.getDefaultVal().trim().isEmpty()) { buffer.append(" (").append(p.getDefaultVal()).append(")"); } buffer.append("</td><td>").append(p.getDescription()).append("</td></tr>"); } } String source = args[0]; String dest = args[1]; replaceValuesInFile(source, dest, map); }  }
CreateBlurServerSetupHtmlPage { public static void main(String[] args) throws IOException { BlurPropertyParser parser = new BlurPropertyParser(); Map<String, List<BlurProp>> props = parser.parse(); Map<String, StringBuffer> map = new HashMap<String, StringBuffer>(); for (Map.Entry<String, List<BlurProp>> prop : props.entrySet()) { StringBuffer buffer = map.get(prop.getKey()); if (buffer == null) { buffer = new StringBuffer(); map.put(prop.getKey(), buffer); } for (BlurProp p : prop.getValue()) { buffer.append("<tr><td>").append(p.getName()); if (!p.getDefaultVal().trim().isEmpty()) { buffer.append(" (").append(p.getDefaultVal()).append(")"); } buffer.append("</td><td>").append(p.getDescription()).append("</td></tr>"); } } String source = args[0]; String dest = args[1]; replaceValuesInFile(source, dest, map); }  static void main(String[] args); }
CreateBlurServerSetupHtmlPage { public static void main(String[] args) throws IOException { BlurPropertyParser parser = new BlurPropertyParser(); Map<String, List<BlurProp>> props = parser.parse(); Map<String, StringBuffer> map = new HashMap<String, StringBuffer>(); for (Map.Entry<String, List<BlurProp>> prop : props.entrySet()) { StringBuffer buffer = map.get(prop.getKey()); if (buffer == null) { buffer = new StringBuffer(); map.put(prop.getKey(), buffer); } for (BlurProp p : prop.getValue()) { buffer.append("<tr><td>").append(p.getName()); if (!p.getDefaultVal().trim().isEmpty()) { buffer.append(" (").append(p.getDefaultVal()).append(")"); } buffer.append("</td><td>").append(p.getDescription()).append("</td></tr>"); } } String source = args[0]; String dest = args[1]; replaceValuesInFile(source, dest, map); }  static void main(String[] args);  }