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;
11 public static void init(Properties conf) {
13 if (!conf.getProperty("port").equals("443")) {
14 port = ":" + conf.getProperty("port");
16 wwwHostName = conf.getProperty("name.www");
17 secureHostName = conf.getProperty("name.secure");
18 staticHostName = conf.getProperty("name.static");
19 apiHostName = conf.getProperty("name.api");
21 public static String getSecureHostName() {
22 return secureHostName;
24 public static String getStaticHostName() {
25 return staticHostName;
27 public static String getWwwHostName() {
30 public static String getApiHostName() {
33 public static String getSecureHostNamePort() {
34 return secureHostName + port;
36 public static String getStaticHostNamePort() {
37 return staticHostName + port;
39 public static String getWwwHostNamePort() {
40 return wwwHostName + port;
42 public static String getApiHostNamePort() {
43 return apiHostName + port;