getModel().put("decoratedComment", decoratedComment);
getModel().put("undecoratedComment", comment);
getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
getModel().put(Constants.COMMENT_KEY, comment);
CommentConfirmationStrategy strategy = blog.getCommentConfirmationStrategy();
Comment clonedComment = (Comment)comment.clone();
if (strategy.isConfirmed(request)) {
try {
saveComment(request, response, blogEntry, comment);
request.getSession().removeAttribute(Constants.COMMENT_KEY);
return new CommentConfirmationView();
} catch (BlogServiceException be) {
log.error(be.getMessage(), be);
throw new ServletException(be);
}
} else {
// try again!
strategy.setupConfirmation(request);
return new ConfirmCommentView();
}
}