Converting service to pure page
This commit is contained in:
parent
3a0f40dab9
commit
f2b4cfdec7
23 changed files with 140 additions and 219 deletions
|
|
@ -31,6 +31,7 @@ public class ApacheConfigVirtualHost implements WAServiceConfig{
|
|||
vhosts = DBBean.load(WAContext.getDB(), ApacheVirtualHostEntry.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return CONFIG_NAME;
|
||||
|
|
|
|||
0
src/wa/server/plugin/apache/ApacheInstaller.java
Normal file → Executable file
0
src/wa/server/plugin/apache/ApacheInstaller.java
Normal file → Executable file
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
package wa.server.plugin.apache;
|
||||
|
||||
import wa.server.page.WAServicePage;
|
||||
import wa.server.plugin.*;
|
||||
import zutil.log.LogUtil;
|
||||
|
||||
|
|
@ -32,24 +33,18 @@ import java.util.logging.Logger;
|
|||
/**
|
||||
* Created by Ziver on 2014-12-23.
|
||||
*/
|
||||
public class ApacheService implements WAService {
|
||||
private static Logger logger = LogUtil.getLogger();
|
||||
public class ApacheService extends WAServicePage {
|
||||
public static final String SERVICE_NAME = "Apache2";
|
||||
|
||||
private ApacheStatus status;
|
||||
private ApacheInstaller installer;
|
||||
private WAServiceConfig[] config;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return SERVICE_NAME;
|
||||
public ApacheService() {
|
||||
super("apache", SERVICE_NAME);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public WAServiceStatus getStatus() {
|
||||
if(status == null)
|
||||
status = new ApacheStatus();
|
||||
return status;
|
||||
return new ApacheStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -59,21 +54,6 @@ public class ApacheService implements WAService {
|
|||
|
||||
@Override
|
||||
public WAInstaller getInstaller() {
|
||||
if(installer == null)
|
||||
installer = new ApacheInstaller();
|
||||
return installer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WAServiceConfig[] getConfigurations() {
|
||||
if(config == null)
|
||||
try {
|
||||
config = new WAServiceConfig[]{
|
||||
new ApacheConfigVirtualHost()
|
||||
};
|
||||
} catch (SQLException e) {
|
||||
logger.log(Level.SEVERE, null, e);
|
||||
}
|
||||
return config;
|
||||
return new ApacheInstaller();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
0
src/wa/server/plugin/apache/apache_default.config
Normal file → Executable file
0
src/wa/server/plugin/apache/apache_default.config
Normal file → Executable file
|
|
@ -2,7 +2,8 @@
|
|||
"version": "1.0",
|
||||
"name": "Apache Web Server",
|
||||
"interfaces": [
|
||||
{"wa.server.plugin.WAService": "wa.server.plugin.apache.ApacheService"},
|
||||
{"wa.server.plugin.WAServiceStatus": "wa.server.plugin.apache.ApacheStatus"}
|
||||
{"wa.server.page.WAServicePage": "wa.server.plugin.apache.ApacheService"},
|
||||
{"wa.server.plugin.WAServiceStatus": "wa.server.plugin.apache.ApacheStatus"},
|
||||
{"wa.server.page.WAConfigPage": "wa.server.plugin.apache.ApacheConfigVirtualHost"}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue