Blog blog = (Blog)getModel().get(Constants.BLOG_KEY);
BlogEntry blogEntry;
String entry = (String)request.getSession().getAttribute(BLOG_ENTRY_ID);
if (entry == null) {
return new NotFoundView();
}
BlogService service = new BlogService();
try {
blogEntry = service.getBlogEntry(blog, entry);
} catch (BlogServiceException e) {
throw new ServletException(e);
}
if (blogEntry == null) {
// just send back a 404 - this is probably somebody looking for a way
// to send comment spam ;-)
return new NotFoundView();
} else if (!blogEntry.isTrackBacksEnabled()) {
return new NotFoundView();
}
getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
TrackBackConfirmationStrategy strategy = blog.getTrackBackConfirmationStrategy();