/** * Save the command history to the properties file. * * @param commandHistory the history */ public void saveCommandHistoryList(ArrayList<String> commandHistory) { StringBuilder sb = new StringBuilder(); for (String s : commandHistory) { if (sb.length() > 0) { sb.append(';'); } sb.append(s.replace("\\", "\\\\").replace(";", "\\;")); } commandHistoryString = sb.toString(); saveProperties(null); }
private String settingRemove() { String setting = attributes.getProperty("name", ""); server.removeSetting(setting); ArrayList<ConnectionInfo> settings = server.getSettings(); if (!settings.isEmpty()) { attributes.put("setting", settings.get(0)); } server.saveProperties(null); return "index.do"; }
/** * Save the current connection settings to the properties file. * * @return the file to open afterwards */ private String settingSave() { ConnectionInfo info = new ConnectionInfo(); info.name = attributes.getProperty("name", ""); info.driver = attributes.getProperty("driver", ""); info.url = attributes.getProperty("url", ""); info.user = attributes.getProperty("user", ""); server.updateSetting(info); attributes.put("setting", info.name); server.saveProperties(null); return "index.do"; }
private String adminSave() { try { Properties prop = new SortedProperties(); int port = Integer.decode((String) attributes.get("port")); prop.setProperty("webPort", String.valueOf(port)); server.setPort(port); boolean allowOthers = Utils.parseBoolean((String) attributes.get("allowOthers"), false, false); prop.setProperty("webAllowOthers", String.valueOf(allowOthers)); server.setAllowOthers(allowOthers); boolean ssl = Utils.parseBoolean((String) attributes.get("ssl"), false, false); prop.setProperty("webSSL", String.valueOf(ssl)); server.setSSL(ssl); server.saveProperties(prop); } catch (Exception e) { trace(e.toString()); } return admin(); }
/** * Save the command history to the properties file. * * @param commandHistory the history */ public void saveCommandHistoryList(ArrayList<String> commandHistory) { StringBuilder sb = new StringBuilder(); for (String s : commandHistory) { if (sb.length() > 0) { sb.append(';'); } sb.append(s.replace("\\", "\\\\").replace(";", "\\;")); } commandHistoryString = sb.toString(); saveProperties(null); }
/** * Save the command history to the properties file. * * @param commandHistory the history */ public void saveCommandHistoryList(ArrayList<String> commandHistory) { StringBuilder sb = new StringBuilder(); for (String s : commandHistory) { if (sb.length() > 0) { sb.append(';'); } sb.append(s.replace("\\", "\\\\").replace(";", "\\;")); } commandHistoryString = sb.toString(); saveProperties(null); }
private String settingRemove() { String setting = attributes.getProperty("name", ""); server.removeSetting(setting); ArrayList<ConnectionInfo> settings = server.getSettings(); if (settings.size() > 0) { attributes.put("setting", settings.get(0)); } server.saveProperties(null); return "index.do"; }
private String settingRemove() { String setting = attributes.getProperty("name", ""); server.removeSetting(setting); ArrayList<ConnectionInfo> settings = server.getSettings(); if (settings.size() > 0) { attributes.put("setting", settings.get(0)); } server.saveProperties(null); return "index.do"; }
/** * Save the current connection settings to the properties file. * * @return the file to open afterwards */ private String settingSave() { ConnectionInfo info = new ConnectionInfo(); info.name = attributes.getProperty("name", ""); info.driver = attributes.getProperty("driver", ""); info.url = attributes.getProperty("url", ""); info.user = attributes.getProperty("user", ""); server.updateSetting(info); attributes.put("setting", info.name); server.saveProperties(null); return "index.do"; }
/** * Save the current connection settings to the properties file. * * @return the file to open afterwards */ private String settingSave() { ConnectionInfo info = new ConnectionInfo(); info.name = attributes.getProperty("name", ""); info.driver = attributes.getProperty("driver", ""); info.url = attributes.getProperty("url", ""); info.user = attributes.getProperty("user", ""); server.updateSetting(info); attributes.put("setting", info.name); server.saveProperties(null); return "index.do"; }
private String adminSave() { try { Properties prop = new SortedProperties(); int port = Integer.decode((String) attributes.get("port")); prop.setProperty("webPort", String.valueOf(port)); server.setPort(port); boolean allowOthers = Boolean.parseBoolean( (String) attributes.get("allowOthers")); prop.setProperty("webAllowOthers", String.valueOf(allowOthers)); server.setAllowOthers(allowOthers); boolean ssl = Boolean.parseBoolean( (String) attributes.get("ssl")); prop.setProperty("webSSL", String.valueOf(ssl)); server.setSSL(ssl); server.saveProperties(prop); } catch (Exception e) { trace(e.toString()); } return admin(); }
private String adminSave() { try { Properties prop = new SortedProperties(); int port = Integer.decode((String) attributes.get("port")); prop.setProperty("webPort", String.valueOf(port)); server.setPort(port); boolean allowOthers = Boolean.parseBoolean( (String) attributes.get("allowOthers")); prop.setProperty("webAllowOthers", String.valueOf(allowOthers)); server.setAllowOthers(allowOthers); boolean ssl = Boolean.parseBoolean( (String) attributes.get("ssl")); prop.setProperty("webSSL", String.valueOf(ssl)); server.setSSL(ssl); server.saveProperties(prop); } catch (Exception e) { trace(e.toString()); } return admin(); }