Added an initial and pre alpha implementation of the the configuration panel.

This commit is contained in:
dev
2011-07-14 14:55:24 +00:00
parent c6d1e3f0ea
commit 664dc83d70
9 changed files with 270 additions and 98 deletions

View File

@ -12,7 +12,7 @@ import net.i2p.itoopie.i2pcontrol.InvalidParametersException;
import net.i2p.itoopie.i2pcontrol.InvalidPasswordException;
import net.i2p.itoopie.i2pcontrol.JSONRPC2Interface;
import net.i2p.itoopie.i2pcontrol.UnrecoverableFailedRequestException;
import net.i2p.itoopie.i2pcontrol.methods.NetworkInfo.NETWORK_INFO;
import net.i2p.itoopie.i2pcontrol.methods.NetworkSetting.NETWORK_SETTING;
import com.thetransactioncompany.jsonrpc2.JSONRPC2Request;
import com.thetransactioncompany.jsonrpc2.JSONRPC2Response;
@ -22,15 +22,15 @@ public class SetNetworkSetting {
private final static Log _log = LogFactory.getLog(SetNetworkSetting.class);
public static HashMap<NETWORK_INFO, Boolean> execute(Map<NETWORK_INFO,String> settings)
public static HashMap<NETWORK_SETTING, Boolean> execute(Map<NETWORK_SETTING,String> settings)
throws InvalidPasswordException, JSONRPC2SessionException, InvalidParametersException{
JSONRPC2Request req = new JSONRPC2Request("NetworkSetting", JSONRPC2Interface.incrNonce());
Map outParams = new HashMap();
Set<Entry<NETWORK_INFO,String>> set = settings.entrySet();
for (Entry<NETWORK_INFO,String> e : set){
Set<Entry<NETWORK_SETTING,String>> set = settings.entrySet();
for (Entry<NETWORK_SETTING,String> e : set){
if(e.getKey().isSetable()){
outParams.put(e.getKey().toString(), e.getValue());
}