} else {
newComment = commentableDoc.addComment(myComment);
}
// automatically validate the comments
if (CommentsConstants.COMMENT_LIFECYCLE.equals(newComment.getLifeCyclePolicy())) {
new FollowTransitionUnrestricted(ctx.getCoreSession(),
newComment.getRef(),
CommentsConstants.TRANSITION_TO_PUBLISHED_STATE).runUnrestricted();
}
// Return the new comment view
Map<String, Object> args = new HashMap<String, Object>();