]> WPIA git - gigi.git/blob - src/org/cacert/gigi/util/ServerConstants.java
28a52eb4e924332fc9726ed35473209fac42ac31
[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 port;
10         public static void init(Properties conf) {
11                 port = "";
12                 if (!conf.getProperty("port").equals("443")) {
13                         port = ":" + conf.getProperty("port");
14                 }
15                 wwwHostName = conf.getProperty("name.www");
16                 secureHostName = conf.getProperty("name.secure");
17                 staticHostName = conf.getProperty("name.static");
18         }
19         public static String getSecureHostName() {
20                 return secureHostName;
21         }
22         public static String getStaticHostName() {
23                 return staticHostName;
24         }
25         public static String getWwwHostName() {
26                 return wwwHostName;
27         }
28         public static String getSecureHostNamePort() {
29                 return secureHostName + port;
30         }
31         public static String getStaticHostNamePort() {
32                 return staticHostName + port;
33         }
34         public static String getWwwHostNamePort() {
35                 return wwwHostName + port;
36         }
37
38 }