]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/util/ServerConstants.java
add: notify board if a support role is granted or removed
[gigi.git] / src / org / cacert / gigi / util / ServerConstants.java
index 8689209444b1f5199b0d6c29905aa2686d33d362..21bbce98f63e9f439f04e96d5415a79e04e874c9 100644 (file)
@@ -14,6 +14,8 @@ public class ServerConstants {
 
     private static String securePort, port;
 
+    private static String suffix = "cacert.local";
+
     public static void init(Properties conf) {
         securePort = port = "";
         if ( !conf.getProperty("https.port").equals("443")) {
@@ -26,6 +28,7 @@ public class ServerConstants {
         secureHostName = conf.getProperty("name.secure");
         staticHostName = conf.getProperty("name.static");
         apiHostName = conf.getProperty("name.api");
+        suffix = conf.getProperty("name.suffix", conf.getProperty("name.www").substring(4));
 
     }
 
@@ -83,4 +86,16 @@ public class ServerConstants {
         return Integer.parseInt(port.substring(1, port.length()));
     }
 
+    public static String getSuffix() {
+        return suffix;
+    }
+
+    public static String getSupportMailAddress() {
+        return "support@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+    }
+
+    public static String getBoardMailAddress() {
+        return "board@" + ServerConstants.getWwwHostName().replaceFirst("^www\\.", "");
+    }
+
 }