Updated Zutil changes
This commit is contained in:
parent
b1833b12ac
commit
5b7f60e3c2
5 changed files with 11 additions and 7 deletions
|
|
@ -12,7 +12,6 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Zutil" exported="" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
|
|
@ -26,5 +25,7 @@
|
|||
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="Maven: se.koc:zutil:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="module" module-name="Zutil.main" />
|
||||
</component>
|
||||
</module>
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package wa.server;
|
||||
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.osal.OSAbstractionLayer;
|
||||
import zutil.osal.OSAbstractionLayer.OSType;
|
||||
|
||||
|
|
@ -12,9 +11,9 @@ public class WAConstants {
|
|||
public static final String DB_DEFAULT_FILE = "webadmin_default.db";
|
||||
public static final String DB_TABLE_PREFIX = "wa";
|
||||
|
||||
public static final String WA_ROOT_PATH_LINUX = "/";
|
||||
public static final String WA_ROOT_PATH_WINDOWS = "C:\\webadmin\\";
|
||||
public static final String WA_BASE_CONFIG_PATH = "etc/webadmin/";
|
||||
public static final String WA_ROOT_PATH_LINUX = "./";
|
||||
public static final String WA_ROOT_PATH_WINDOWS = "./"; //C:\\webadmin\\";
|
||||
public static final String WA_BASE_CONFIG_PATH = "./"; //"etc/webadmin/";
|
||||
private static final File configPath;
|
||||
|
||||
public static final String WA_SSL_CERT = "cert/server.crt";
|
||||
|
|
|
|||
|
|
@ -95,11 +95,14 @@ public class WAContext {
|
|||
File defDbFile = WAConstants.getConfigFile(WAConstants.DB_DEFAULT_FILE);
|
||||
if (!defDbFile.exists())
|
||||
throw new NoSuchFileException("Deafult DB missing: "+defDbFile.getAbsolutePath());
|
||||
|
||||
db = new DBConnection(DBConnection.DBMS.SQLite, dbFile.getAbsolutePath());
|
||||
DBConnection defaultDB = new DBConnection(DBConnection.DBMS.SQLite, defDbFile.getAbsolutePath());
|
||||
|
||||
int defaultDBVersion = Integer.parseInt(getConfig(defaultDB, CONFIG_DB_VERSION));
|
||||
int dbVersion = Integer.parseInt(getConfig(db, CONFIG_DB_VERSION));
|
||||
logger.info("DB version: "+ dbVersion);
|
||||
|
||||
if(defaultDBVersion > dbVersion ) {
|
||||
logger.info("Starting DB upgrade...");
|
||||
if (dbFile != null) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import zutil.ui.Navigation;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
|
@ -47,7 +48,7 @@ public class ServiceStatusPage extends WAPage {
|
|||
public static final String NAVIGATION_NAME = "Service Status";
|
||||
private static final String TMPL_FILE = "WebContent/page/ServiceStatusPage.tmpl";
|
||||
|
||||
private ArrayList<WAServiceStatus> services;
|
||||
private List<WAServiceStatus> services;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ public abstract class WAPage implements HttpPage{
|
|||
|
||||
|
||||
public static void initialize() {
|
||||
for (Iterator<WAPage> it = WAContext.getPluginManager().getObjectIterator(WAPage.class); it.hasNext(); ){
|
||||
for (Iterator<WAPage> it = WAContext.getPluginManager().getSingletonIterator(WAPage.class); it.hasNext(); ){
|
||||
WAContext.registerWaPage(it.next());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue