* Called when a comment or TrackBack has been added.
*
* @param response a Response
*/
protected void blogEntryResponseAdded(Response response) {
PluginProperties props = response.getBlogEntry().getBlog().getPluginProperties();
String propertyName = "";
if (response instanceof Comment) {
propertyName = COMMENT_THRESHOLD_KEY;
} else {
propertyName = TRACKBACK_THRESHOLD_KEY;
}
int threshold = DEFAULT_THRESHOLD;
if (props.hasProperty(propertyName)) {
try {
threshold = Integer.parseInt(props.getProperty(propertyName));
} catch (NumberFormatException nfe) {
log.error(nfe.getMessage());
// do nothing, the value has already been defaulted
}
}