]> WPIA git - gigi.git/blob - src/org/cacert/gigi/util/ServerConstants.java
Adding stub for gigi-api (api.gigi.org)
[gigi.git] / src / org / cacert / gigi / util / ServerConstants.java
1 package org.cacert.gigi.util;
2
3 import java.util.Properties;
4
5 public class ServerConstants {
6         private static String wwwHostName = "www.cacert.local";
7         private static String secureHostName = "secure.cacert.local";
8         private static String staticHostName = "static.cacert.local";
9         private static String apiHostName = "api.cacert.local";
10         private static String port;
11         public static void init(Properties conf) {
12                 port = "";
13                 if (!conf.getProperty("port").equals("443")) {
14                         port = ":" + conf.getProperty("port");
15                 }
16                 wwwHostName = conf.getProperty("name.www");
17                 secureHostName = conf.getProperty("name.secure");
18                 staticHostName = conf.getProperty("name.static");
19                 apiHostName = conf.getProperty("name.api");
20         }
21         public static String getSecureHostName() {
22                 return secureHostName;
23         }
24         public static String getStaticHostName() {
25                 return staticHostName;
26         }
27         public static String getWwwHostName() {
28                 return wwwHostName;
29         }
30         public static String getApiHostName() {
31                 return apiHostName;
32         }
33         public static String getSecureHostNamePort() {
34                 return secureHostName + port;
35         }
36         public static String getStaticHostNamePort() {
37                 return staticHostName + port;
38         }
39         public static String getWwwHostNamePort() {
40                 return wwwHostName + port;
41         }
42         public static String getApiHostNamePort() {
43                 return apiHostName + port;
44         }
45
46 }