String action = request.getParameter("action");
if (action == null) {
// do nothing
} else if (action.equalsIgnoreCase("ipAddressListener")) {
Utilities.buildIpAddressLists(blog);
return new ForwardView("/reloadBlog.secureaction");
} else if (action.equalsIgnoreCase("fixHtmlInResponses")) {
Utilities.fixHtmlInResponses(blog);
return new ForwardView("/reloadBlog.secureaction");
} else if (action.equalsIgnoreCase("buildIndexes")) {
Utilities.buildIndexes(blog);
return new ForwardView("/reloadBlog.secureaction");
} else if (action.equalsIgnoreCase("convertCategories")) {
Utilities.convertCategories(blog);
return new ForwardView("/reloadBlog.secureaction");
} else if (action.equalsIgnoreCase("restructureBlogToGMT")) {
Utilities.restructureBlogToGMT(blog);
Utilities.buildIndexes(blog);
return new ForwardView("/reloadBlog.secureaction");
} else if (action.equalsIgnoreCase("moveBlogEntriesFromCategory")) {
Category from = blog.getCategory(request.getParameter("from"));
Category to = blog.getCategory(request.getParameter("to"));
if (from != null && to != null) {
Utilities.moveBlogEntriesFromCategory(blog, from, to);