Initial impl of configuration page
This commit is contained in:
parent
78cb41a39c
commit
813d48ca05
5 changed files with 80 additions and 55 deletions
|
|
@ -2,38 +2,19 @@ package wa.server.plugin.apache;
|
|||
|
||||
import wa.server.WAConstants;
|
||||
import wa.server.plugin.WAServiceConfig;
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.db.bean.DBBean;
|
||||
import zutil.db.bean.DBBean.DBTable;;import java.io.IOException;
|
||||
import java.sql.SQLException;
|
||||
import zutil.db.bean.DBBean.DBTable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@DBTable(WAConstants.DB_TABLE_PREFIX+"_apache_vhost")
|
||||
public class ApacheConfigVirtualHost implements WAServiceConfig{
|
||||
public static final String CONFIG_NAME = "Apache Virtual Host";
|
||||
|
||||
protected String domain;
|
||||
protected String path;
|
||||
protected boolean ssl;
|
||||
private List<VirtualHostData> vhosts = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
public boolean isSSL() {
|
||||
return ssl;
|
||||
}
|
||||
public void setSSL(boolean ssl) {
|
||||
this.ssl = ssl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
|
@ -41,12 +22,47 @@ public class ApacheConfigVirtualHost implements WAServiceConfig{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void read() throws SQLException {
|
||||
public void read() throws Exception {
|
||||
DBConnection db = WAConstants.getDB();
|
||||
vhosts = DBBean.load(db, VirtualHostData.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save() throws IOException {
|
||||
public void configure() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@DBTable(WAConstants.DB_TABLE_PREFIX + "_apache_vhost")
|
||||
public static class VirtualHostData extends DBBean{
|
||||
protected String domain;
|
||||
protected String path;
|
||||
protected boolean ssl;
|
||||
|
||||
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
public boolean isSSL() {
|
||||
return ssl;
|
||||
}
|
||||
public void setSSL(boolean ssl) {
|
||||
this.ssl = ssl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue