X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Fclub%2Fwpia%2Fgigi%2Futil%2FServerConstants.java;h=8ff3883cf99f4f923a2b634743d0f1a064edff70;hp=d95db1b538f2b54a2a72f91df7d0507f98ef3959;hb=f9c330aaf4537d80cb6bb4a0734b2fe7fe5c6b89;hpb=5a1b7ee1d24604eaa2d0572f59555b5777e9c4eb diff --git a/src/club/wpia/gigi/util/ServerConstants.java b/src/club/wpia/gigi/util/ServerConstants.java index d95db1b5..8ff3883c 100644 --- a/src/club/wpia/gigi/util/ServerConstants.java +++ b/src/club/wpia/gigi/util/ServerConstants.java @@ -60,6 +60,8 @@ public class ServerConstants { private static String appName = null; + private static String appIdentifier = null; + public static void init(Properties conf) { securePort = port = ""; if ( !conf.getProperty("https.port").equals("443")) { @@ -81,6 +83,10 @@ public class ServerConstants { if (appName == null) { throw new Error("App name missing"); } + appIdentifier = conf.getProperty("appIdentifier"); + if (appIdentifier == null) { + throw new Error("App identifier missing"); + } } public static String getHostName(Host h) { @@ -150,4 +156,11 @@ public class ServerConstants { return appName; } + public static String getAppIdentifier() { + if (appIdentifier == null) { + throw new Error("AppIdentifier not initialized."); + } + return appIdentifier; + } + }