setProperty(props, request, Environment.PROP_DBCP_WHEN_EXHAUSTED_ACTION);
String maxFileSizeString = request
.getParameter(Environment.PROP_FILE_MAX_FILE_SIZE);
if (StringUtils.isBlank(maxFileSizeString)
|| !StringUtils.isNumeric(maxFileSizeString)) {
errors.add(new WikiMessage("admin.message.nonnumeric",
Environment.PROP_FILE_MAX_FILE_SIZE, maxFileSizeString));
} else {
int maxFileSizeInKB = Integer.parseInt(maxFileSizeString);
props.setProperty(Environment.PROP_FILE_MAX_FILE_SIZE, Integer
.toString(maxFileSizeInKB * 1000));
}
setProperty(props, request, Environment.PROP_FILE_DIR_FULL_PATH);
setProperty(props, request, Environment.PROP_FILE_DIR_RELATIVE_PATH);
setProperty(props, request, Environment.PROP_FILE_SERVER_URL);
setProperty(props, request, Environment.PROP_FILE_BLACKLIST_TYPE);
setProperty(props, request, Environment.PROP_FILE_BLACKLIST);
setProperty(props, request, Environment.PROP_FILE_WHITELIST);
/*
* setProperty(props, request, Environment.PROP_EMAIL_SMTP_HOST);
* setProperty(props, request, Environment.PROP_EMAIL_SMTP_USERNAME);
* setPassword(props, request, next, Environment.PROP_EMAIL_SMTP_PASSWORD,
* "smtpPassword"); setProperty(props, request,
* Environment.PROP_EMAIL_REPLY_ADDRESS);
*/
setNumericProperty(props, request,
Environment.PROP_CACHE_INDIVIDUAL_SIZE, errors);
setNumericProperty(props, request, Environment.PROP_CACHE_MAX_AGE, errors);
setNumericProperty(props, request, Environment.PROP_CACHE_MAX_IDLE_AGE,
errors);
setNumericProperty(props, request, Environment.PROP_CACHE_TOTAL_SIZE,
errors);
setBooleanProperty(props, request, Environment.PROP_RSS_ALLOWED);
setProperty(props, request, Environment.PROP_RSS_TITLE);
errors.addAll(ServletUtil.validateSystemSettings(props));
if (this.saveProperties(request, next, pageInfo, props, errors)) {
next
.addObject("message", new WikiMessage("admin.message.changessaved"));
}
} catch (Exception e) {
logger.severe("Failure while processing property values", e);
next.addObject("message", new WikiMessage(
"admin.message.propertyfailure", e.getMessage()));
}
viewAdmin(request, next, pageInfo, props);
}