X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Futil%2FServerConstants.java;h=eafe93933647b7519860cb4b4fea0917b8e7d1d6;hb=3252dc36fadd1a7e5f13bc01401e10565d61f635;hp=28a52eb4e924332fc9726ed35473209fac42ac31;hpb=d690eda36eba121aa79e4f456d5f0eb481be8b86;p=gigi.git diff --git a/src/org/cacert/gigi/util/ServerConstants.java b/src/org/cacert/gigi/util/ServerConstants.java index 28a52eb4..eafe9393 100644 --- a/src/org/cacert/gigi/util/ServerConstants.java +++ b/src/org/cacert/gigi/util/ServerConstants.java @@ -6,7 +6,9 @@ public class ServerConstants { private static String wwwHostName = "www.cacert.local"; private static String secureHostName = "secure.cacert.local"; private static String staticHostName = "static.cacert.local"; + private static String apiHostName = "api.cacert.local"; private static String port; + public static void init(Properties conf) { port = ""; if (!conf.getProperty("port").equals("443")) { @@ -15,24 +17,39 @@ public class ServerConstants { wwwHostName = conf.getProperty("name.www"); secureHostName = conf.getProperty("name.secure"); staticHostName = conf.getProperty("name.static"); + apiHostName = conf.getProperty("name.api"); } + public static String getSecureHostName() { return secureHostName; } + public static String getStaticHostName() { return staticHostName; } + public static String getWwwHostName() { return wwwHostName; } + + public static String getApiHostName() { + return apiHostName; + } + public static String getSecureHostNamePort() { return secureHostName + port; } + public static String getStaticHostNamePort() { return staticHostName + port; } + public static String getWwwHostNamePort() { return wwwHostName + port; } + public static String getApiHostNamePort() { + return apiHostName + port; + } + }