]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/util/ServerConstants.java
upd: replace SomeCA by variable
[gigi.git] / src / club / wpia / gigi / util / ServerConstants.java
index becd77e65d9662afa5328eb9c4d0cedf7709cc48..d95db1b538f2b54a2a72f91df7d0507f98ef3959 100644 (file)
@@ -58,6 +58,8 @@ public class ServerConstants {
 
     private static String suffix = "wpia.local";
 
+    private static String appName = null;
+
     public static void init(Properties conf) {
         securePort = port = "";
         if ( !conf.getProperty("https.port").equals("443")) {
@@ -75,6 +77,10 @@ public class ServerConstants {
             hostnames.put(h, conf.getProperty("name." + h.getConfigName(), h.getHostDefaultPrefix() + "." + suffix));
         }
         ServerConstants.hostnames = Collections.unmodifiableMap(hostnames);
+        appName = conf.getProperty("appName");
+        if (appName == null) {
+            throw new Error("App name missing");
+        }
     }
 
     public static String getHostName(Host h) {
@@ -137,4 +143,11 @@ public class ServerConstants {
         return "quiz-admin@" + getSuffix();
     }
 
+    public static String getAppName() {
+        if (appName == null) {
+            throw new Error("AppName not initialized.");
+        }
+        return appName;
+    }
+
 }