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 apiHostName = "api.cacert.local";
10 private static String port;
12 public static void init(Properties conf) {
14 if (!conf.getProperty("port").equals("443")) {
15 port = ":" + conf.getProperty("port");
17 wwwHostName = conf.getProperty("name.www");
18 secureHostName = conf.getProperty("name.secure");
19 staticHostName = conf.getProperty("name.static");
20 apiHostName = conf.getProperty("name.api");
23 public static String getSecureHostName() {
24 return secureHostName;
27 public static String getStaticHostName() {
28 return staticHostName;
31 public static String getWwwHostName() {
35 public static String getApiHostName() {
39 public static String getSecureHostNamePort() {
40 return secureHostName + port;
43 public static String getStaticHostNamePort() {
44 return staticHostName + port;
47 public static String getWwwHostNamePort() {
48 return wwwHostName + port;
51 public static String getApiHostNamePort() {
52 return apiHostName + port;