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")) {
secureBindPort = conf.getProperty("https.bindPort", conf.getProperty("https.port"));
bindPort = conf.getProperty("http.bindPort", conf.getProperty("http.port"));
- suffix = conf.getProperty("name.suffix", conf.getProperty("name.www", "www.wpia.local").substring(4));
+ suffix = conf.getProperty("name.suffix", "wpia.local");
HashMap<Host, String> hostnames = new HashMap<>();
for (Host h : Host.values()) {
hostnames.put(h, conf.getProperty("name." + h.getConfigName(), h.getHostDefaultPrefix() + "." + suffix));
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) {
return appName;
}
+ public static String getAppIdentifier() {
+ if (appIdentifier == null) {
+ throw new Error("AppIdentifier not initialized.");
+ }
+ return appIdentifier;
+ }
+
}