(String json)
| 90 | } |
| 91 | |
| 92 | public void setOptions(String json) throws Exception { |
| 93 | DaoHub daoHub = new Gson().fromJson(json, DaoHub.class); |
| 94 | |
| 95 | Database.getInstance().dropConfigs(); |
| 96 | |
| 97 | for (ListenPort listenPort : daoHub.listenPortList) { |
| 98 | |
| 99 | ListenPorts.getInstance().create(listenPort); |
| 100 | } |
| 101 | for (Server server : daoHub.serverList) { |
| 102 | |
| 103 | Servers.getInstance().create(server); |
| 104 | } |
| 105 | for (Modification mod : daoHub.modificationList) { |
| 106 | |
| 107 | Modifications.getInstance().create(mod); |
| 108 | } |
| 109 | for (SSLPassThrough passThrough : daoHub.sslPassThroughList) { |
| 110 | |
| 111 | SSLPassThroughs.getInstance().create(passThrough); |
| 112 | } |
| 113 | } |
| 114 | } |
no test coverage detected