diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigConsoleHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigConsoleHandler.java deleted file mode 100644 index 758ddae056deb1678cdcd32d0398d9d57ffb270f..0000000000000000000000000000000000000000 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigConsoleHandler.java +++ /dev/null @@ -1,61 +0,0 @@ -package net.i2p.router.web; - -/** - * Handler to deal with console config. - * - */ -public class ConfigConsoleHandler extends FormHandler { - - private boolean _forceRestart; - private boolean _shouldSave; - private String _configPass; - // This is possibly the wrong place for this... - // private String _configPort; - - @Override - protected void processForm() { - if(_shouldSave) { - saveChanges(); - } else { - // noop - } - } - - public void setShouldsave(String moo) { - _shouldSave = true; - } - - public void setRestart(String moo) { - _forceRestart = true; - } - - public void setConfigPass(String val) { - _configPass = val.trim(); - } - - /** - * The user made changes to the config and wants to save them, so - * lets go ahead and do so. - * - */ - private void saveChanges() { - if(_configPass != null) { - _context.router().setConfigSetting("consolePassword", _configPass); - } else { - _context.router().setConfigSetting("consolePassword", ""); - } - - boolean saved = _context.router().saveConfig(); - if(saved) { - addFormNotice("Configuration saved successfully"); - } else { - addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs"); - } - - if(_forceRestart) { - addFormNotice("Performing a soft restart"); - _context.router().restart(); - addFormNotice("Soft restart complete"); - } - } -} diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigConsoleHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigConsoleHelper.java deleted file mode 100644 index 78aac3b99ba5b2ca095612f8196dbafd7df857d8..0000000000000000000000000000000000000000 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigConsoleHelper.java +++ /dev/null @@ -1,14 +0,0 @@ -package net.i2p.router.web; - - -public class ConfigConsoleHelper extends HelperBase { - private String consolePassword="consolePassword"; - - public ConfigConsoleHelper() {} - - public String getSettings() { - StringBuilder buf = new StringBuilder(4*1024); - buf.append(consolePassword); - return buf.toString(); - } -}