- Implemented loading and storing of a 'isStandaloneServer' attribute of a new SailingServerConfiguration domain object.

- Implemented a tab in the admin console for showing static server information and dynamic server configuration
- refactoring of static BuildVersion class into more generic ServerInfo class
This commit is contained in:
fmittag committed 2015-09-02 00:37:41 +02:00
1 parent aa8bc4b7b2
commit b43786d728
34 files changed
+457 -73

No files matched your search

@@ -1,21 +0,0 @@
package com.sap.sse;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
public class BuildVersion {
public static String getBuildVersion() {
String version = "Unknown or Development (" + System.getProperty("com.sap.sailing.server.name") + ")";
File versionfile = new File(System.getProperty("jetty.home") + File.separator + "version.txt");
if (versionfile.exists()) {
try {
version = new BufferedReader(new FileReader(versionfile)).readLine();
} catch (Exception ex) {
/* ignore */
}
}
return version;
}
}
@@ -0,0 +1,29 @@
package com.sap.sse;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
/**
* A class providing static information about the running server.
* @author Frank
*
*/
public class ServerInfo {
public static String getBuildVersion() {
String version = "Unknown or Development (" + ServerStartupConstants.SERVER_NAME + ")";
File versionfile = new File(ServerStartupConstants.JETTY_HOME + File.separator + "version.txt");
if (versionfile.exists()) {
try {
version = new BufferedReader(new FileReader(versionfile)).readLine();
} catch (Exception ex) {
/* ignore */
}
}
return version;
}
public static String getName() {
return ServerStartupConstants.SERVER_NAME;
}
}
@@ -0,0 +1,6 @@
package com.sap.sse;
public interface ServerStartupConstants {
final static String SERVER_NAME = System.getProperty("com.sap.sailing.server.name");
final static String JETTY_HOME = System.getProperty("jetty.home");
}