1 package org.cacert.gigi.util;
3 import java.util.Properties;
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) {
12 if (!conf.getProperty("port").equals("443")) {
13 port = ":" + conf.getProperty("port");
15 wwwHostName = conf.getProperty("name.www");
16 secureHostName = conf.getProperty("name.secure");
17 staticHostName = conf.getProperty("name.static");
19 public static String getSecureHostName() {
20 return secureHostName;
22 public static String getStaticHostName() {
23 return staticHostName;
25 public static String getWwwHostName() {
28 public static String getSecureHostNamePort() {
29 return secureHostName + port;
31 public static String getStaticHostNamePort() {
32 return staticHostName + port;
34 public static String getWwwHostNamePort() {
35 return wwwHostName + port;