/**
   * read enviroment value of FAMUNDO_SERVER_TYPE and return the enum it maches
   *
   * @return enum ServerEnv
   */
  private static ServerEnv initServerEnv() {

    String env = System.getenv("FAMUNDO_SERVER_TYPE");
    if (!FUtil.isBlank(env)) {
      ServerEnv[] srva = {DUDI_SERVER, TEST_SERVER, PRODUCTION_SERVER};
      for (int i = 0; i < srva.length; i++) {
        if (srva[i].getEnvName().equals(env)) return srva[i];
      }
    }
    return DUDI_SERVER; // default
  }
 /**
  * Extract the family name from a string<br>
  * this will get the family name from a full or partial family URL
  *
  * @param family some form of the family URL
  * @return String
  */
 public static String parseFamilyName(String family) {
   return FUtil.parseFamilyName(family, getCurrentTemplate());
 }
 /** @return String current server domain name (e.g "famundo.com") */
 public static String getDomain() {
   return FUtil.getFamilyUrlTemplateDomain(serverEnv.template);
 }