+ Added CTConf bean and postData formatting
parent
3dc9b97d1e
commit
166669c287
@ -0,0 +1,63 @@
|
|||||||
|
package fr.sixthemes.beans;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class CTConf {
|
||||||
|
|
||||||
|
protected SysConf systemConfiguration;
|
||||||
|
protected NetConf inet4Configuration;
|
||||||
|
protected NetConf6 inet6Configuration;
|
||||||
|
|
||||||
|
|
||||||
|
public CTConf() {
|
||||||
|
this.systemConfiguration = new SysConf();
|
||||||
|
this.inet4Configuration = new NetConf();
|
||||||
|
this.inet6Configuration = new NetConf6();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CTConf(SysConf system, NetConf inet4, NetConf6 inet6) {
|
||||||
|
this.systemConfiguration = system;
|
||||||
|
this.inet4Configuration = inet4;
|
||||||
|
this.inet6Configuration = inet6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getParameters() {
|
||||||
|
Map<String, String> parameters = new HashMap<>();
|
||||||
|
|
||||||
|
parameters.put("unprivileged", "1");
|
||||||
|
parameters.put("features", "nesting=1");
|
||||||
|
// TODO : Remove hardcoded password
|
||||||
|
parameters.put("password", "12345");
|
||||||
|
|
||||||
|
parameters.putAll(systemConfiguration.getParameters());
|
||||||
|
parameters.putAll(inet4Configuration.getParameters());
|
||||||
|
|
||||||
|
return parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysConf getSystemConfiguration() {
|
||||||
|
return this.systemConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NetConf getInet4Configuration() {
|
||||||
|
return this.inet4Configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NetConf6 getInet6Configuration() {
|
||||||
|
return this.inet6Configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSystemConfiguration(SysConf systemConfiguration) {
|
||||||
|
this.systemConfiguration = systemConfiguration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInet4Configuration(NetConf inet4Configuration) {
|
||||||
|
this.inet4Configuration = inet4Configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInet6Configuration(NetConf6 inet6Configuration) {
|
||||||
|
this.inet6Configuration = inet6Configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue