예제 #1
0
  private int getEmailDaysCutoff() {
    String emailDaysCutoff = SysConfigManager.instance().getValue("emailDaysCutoff");

    if (StringUtils.isEmpty(emailDaysCutoff)) {
      return 30;
    } else {
      return Integer.valueOf(emailDaysCutoff);
    }
  }
예제 #2
0
  private int getMaxMessageSize() {
    try {
      String config = SysConfigManager.instance().getValue("maxMessageSize");

      if (StringUtils.isEmpty(config)) {
        return DEFAULT_MAXIMUM_MESSAGE_SIZE;
      } else {
        return Integer.parseInt(config);
      }
    } catch (Throwable t) {
      log.warn(
          String.format(
              "Unable to determined maximum message size, defaulting to %d",
              DEFAULT_MAXIMUM_MESSAGE_SIZE),
          t);
      return DEFAULT_MAXIMUM_MESSAGE_SIZE;
    }
  }