* Creates a new instance using the configuration in the given {@link Properties}
*
* @param properties configuration properties
*/
public EmbedVaadinConfig(Properties properties) {
final PropertiesHelper helper = new PropertiesHelper(properties);
port = helper.getIntProperty(KEY_PORT, DEFAULT_PORT);
setContextPath(properties.getProperty(KEY_CONTEXT_PATH, DEFAULT_CONTEXT_PATH));
final String contextBase = properties.getProperty(KEY_CONTEXT_ROOT_DIR);
if (contextBase == null) {
contextRootDirectory = Files.createTempDir();
} else {
contextRootDirectory = new File(contextBase);
}
waiting = helper.getBooleanProperty(KEY_WAITING, DEFAULT_WAITING);
widgetSet = properties.getProperty(KEY_WIDGET_SET);
productionMode = helper.getBooleanProperty(KEY_PRODUCTION_MODE, DEFAULT_PRODUCTION_MODE);
openBrowser = helper.getBooleanProperty(KEY_OPEN_BROWSER, DEFAULT_OPEN_BROWSER);
customBrowserUrl = properties.getProperty(KEY_CUSTOM_BROWSER_URL);
logger.debug("Using " + this);
// Validate