mLogger.debug("Moving categories to category, id="
+ form.getMoveToCategoryId());
// Move subCategories to new category.
String Categories[] = form.getSelectedCategories();
WeblogCategoryData parent =
wmgr.getWeblogCategory(form.getMoveToCategoryId());
if (null != Categories)
{
for (int i = 0; i < Categories.length; i++)
{
WeblogCategoryData cd =
wmgr.getWeblogCategory(Categories[i]);
// Don't move category into itself.
if ( !cd.getId().equals(parent.getId())
&& !parent.descendentOf(cd))
{
cd.setParent(parent);
wmgr.saveWeblogCategory(cd);
}
else
{
messages.add(null, new ActionMessage(
"categoriesForm.warn.notMoving",cd.getName()));
}
}
}
// TODO: new manager method, moveCategory(cat, newPath)
RollerFactory.getRoller().flush();