@Test public void storeTo() { Properties p = new Properties(); p.setProperty(k("test", KEY_DATA_CLASS), String.class.getName()); p.setProperty(k("test", KEY_PROCESS_TYPE), "plain"); p.setProperty(k("test", PREFIX_SOURCE), "ts"); p.setProperty(k("test", PREFIX_SOURCE, "aaa"), "bbb"); p.setProperty(k("test", PREFIX_DRAIN), "td"); p.setProperty(k("test", PREFIX_DRAIN, "bbb"), "ccc"); GateScript script = GateScript.loadFrom("testing", p, getClass().getClassLoader()); Properties target = new Properties(); script.storeTo(target); assertThat(target, is(p)); }
public void storeTo(Properties properties) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } LOG.debug("Saving WindGate script"); for (ProcessScript<?> process : processes) { PropertiesUtil.checkAbsentKeyPrefix(properties, process.getName() + QUALIFIER); } for (ProcessScript<?> process : processes) { storeProcessTo(properties, process); } }
GateScript { public void storeTo(Properties properties) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } LOG.debug("Saving WindGate script"); for (ProcessScript<?> process : processes) { PropertiesUtil.checkAbsentKeyPrefix(properties, process.getName() + QUALIFIER); } for (ProcessScript<?> process : processes) { storeProcessTo(properties, process); } } }
GateScript { public void storeTo(Properties properties) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } LOG.debug("Saving WindGate script"); for (ProcessScript<?> process : processes) { PropertiesUtil.checkAbsentKeyPrefix(properties, process.getName() + QUALIFIER); } for (ProcessScript<?> process : processes) { storeProcessTo(properties, process); } } GateScript(String name, List<? extends ProcessScript<?>> processes); }
GateScript { public void storeTo(Properties properties) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } LOG.debug("Saving WindGate script"); for (ProcessScript<?> process : processes) { PropertiesUtil.checkAbsentKeyPrefix(properties, process.getName() + QUALIFIER); } for (ProcessScript<?> process : processes) { storeProcessTo(properties, process); } } GateScript(String name, List<? extends ProcessScript<?>> processes); String getName(); List<ProcessScript<?>> getProcesses(); static GateScript loadFrom(String name, Properties properties, ClassLoader loader); void storeTo(Properties properties); }
GateScript { public void storeTo(Properties properties) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } LOG.debug("Saving WindGate script"); for (ProcessScript<?> process : processes) { PropertiesUtil.checkAbsentKeyPrefix(properties, process.getName() + QUALIFIER); } for (ProcessScript<?> process : processes) { storeProcessTo(properties, process); } } GateScript(String name, List<? extends ProcessScript<?>> processes); String getName(); List<ProcessScript<?>> getProcesses(); static GateScript loadFrom(String name, Properties properties, ClassLoader loader); void storeTo(Properties properties);  }