This commit is contained in:
parent
b5c3c18e28
commit
4ece2b0cd2
5 changed files with 20 additions and 5 deletions
|
|
@ -24,6 +24,7 @@ package wa.server.page;
|
||||||
|
|
||||||
import wa.server.WAContext;
|
import wa.server.WAContext;
|
||||||
import wa.server.page.struct.WANavigation;
|
import wa.server.page.struct.WANavigation;
|
||||||
|
import wa.server.plugin.WAConfiguration;
|
||||||
import wa.server.plugin.WAService;
|
import wa.server.plugin.WAService;
|
||||||
import wa.server.plugin.WAServiceStatus;
|
import wa.server.plugin.WAServiceStatus;
|
||||||
import zutil.io.file.FileUtil;
|
import zutil.io.file.FileUtil;
|
||||||
|
|
@ -56,8 +57,11 @@ public class ServicePage implements WAPage {
|
||||||
|
|
||||||
WANavigation nav = new WANavigation(NAVIGATION_NAME, this);
|
WANavigation nav = new WANavigation(NAVIGATION_NAME, this);
|
||||||
for(WAService plugin : services) {
|
for(WAService plugin : services) {
|
||||||
nav.addSubNav(new WANavigation(plugin.getName(), plugin));
|
|
||||||
statuses.add(new ServiceStatusPage(plugin.getStatus()));
|
statuses.add(new ServiceStatusPage(plugin.getStatus()));
|
||||||
|
nav.addSubNav(new WANavigation(plugin.getName(), plugin));
|
||||||
|
for(WAConfiguration conf : plugin.getConfigurations()){
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
WANavigation.addRootNav(nav);
|
WANavigation.addRootNav(nav);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import java.sql.SQLException;
|
||||||
|
|
||||||
import zutil.db.DBConnection;
|
import zutil.db.DBConnection;
|
||||||
|
|
||||||
public interface WAConfigurator {
|
public interface WAConfiguration {
|
||||||
public void read(DBConnection db) throws SQLException;
|
public void read(DBConnection db) throws SQLException;
|
||||||
public void save(DBConnection db) throws IOException;
|
public void save(DBConnection db) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
@ -13,4 +13,9 @@ public interface WAService {
|
||||||
* @return a installer object that will install the service or null if the installer is not available
|
* @return a installer object that will install the service or null if the installer is not available
|
||||||
*/
|
*/
|
||||||
public WAInstaller getInstaller();
|
public WAInstaller getInstaller();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return a array of configuration objects
|
||||||
|
*/
|
||||||
|
public WAConfiguration[] getConfigurations();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import wa.server.WAConstants;
|
import wa.server.WAConstants;
|
||||||
import wa.server.plugin.WAConfigurator;
|
import wa.server.plugin.WAConfiguration;
|
||||||
import wa.server.util.ConfigFileUtil;
|
import wa.server.util.ConfigFileUtil;
|
||||||
import zutil.db.DBConnection;
|
import zutil.db.DBConnection;
|
||||||
import zutil.io.file.FileUtil;
|
import zutil.io.file.FileUtil;
|
||||||
|
|
||||||
public class ApacheConfigurator implements WAConfigurator {
|
public class ApacheConfiguration implements WAConfiguration {
|
||||||
private static final String APACHE_CONF_FILE = "wa_apache_vhost.conf";
|
private static final String APACHE_CONF_FILE = "wa_apache_vhost.conf";
|
||||||
private static final String APACHE_MAIN_CONFIG_FILE = "/etc/apache2/apache2.conf";
|
private static final String APACHE_MAIN_CONFIG_FILE = "/etc/apache2/apache2.conf";
|
||||||
private static final String STATIC_PRE_CONF = "wa/server/plugin/apache/apache_default.config";
|
private static final String STATIC_PRE_CONF = "wa/server/plugin/apache/apache_default.config";
|
||||||
|
|
@ -22,7 +22,7 @@ public class ApacheConfigurator implements WAConfigurator {
|
||||||
List<ApacheConfigVirtualHost> vhosts;
|
List<ApacheConfigVirtualHost> vhosts;
|
||||||
|
|
||||||
|
|
||||||
public ApacheConfigurator(){
|
public ApacheConfiguration(){
|
||||||
vhosts = new LinkedList<ApacheConfigVirtualHost>();
|
vhosts = new LinkedList<ApacheConfigVirtualHost>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
package wa.server.plugin.apache;
|
package wa.server.plugin.apache;
|
||||||
|
|
||||||
|
import wa.server.plugin.WAConfiguration;
|
||||||
import wa.server.plugin.WAInstaller;
|
import wa.server.plugin.WAInstaller;
|
||||||
import wa.server.plugin.WAService;
|
import wa.server.plugin.WAService;
|
||||||
import wa.server.plugin.WAServiceStatus;
|
import wa.server.plugin.WAServiceStatus;
|
||||||
|
|
@ -57,4 +58,9 @@ public class ApacheService implements WAService {
|
||||||
installer = new ApacheInstaller();
|
installer = new ApacheInstaller();
|
||||||
return installer;
|
return installer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WAConfiguration[] getConfigurations() {
|
||||||
|
return new WAConfiguration[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue