1 package org.cacert.gigi.util;
3 import java.util.Properties;
5 public class ServerConstants {
7 private static String wwwHostName = "www.cacert.local";
9 private static String secureHostName = "secure.cacert.local";
11 private static String staticHostName = "static.cacert.local";
13 private static String apiHostName = "api.cacert.local";
15 private static String port;
17 public static void init(Properties conf) {
19 if ( !conf.getProperty("port").equals("443")) {
20 port = ":" + conf.getProperty("port");
22 wwwHostName = conf.getProperty("name.www");
23 secureHostName = conf.getProperty("name.secure");
24 staticHostName = conf.getProperty("name.static");
25 apiHostName = conf.getProperty("name.api");
28 public static String getSecureHostName() {
29 return secureHostName;
32 public static String getStaticHostName() {
33 return staticHostName;
36 public static String getWwwHostName() {
40 public static String getApiHostName() {
44 public static String getSecureHostNamePort() {
45 return secureHostName + port;
48 public static String getStaticHostNamePort() {
49 return staticHostName + port;
52 public static String getWwwHostNamePort() {
53 return wwwHostName + port;
56 public static String getApiHostNamePort() {
57 return apiHostName + port;