final int result = thesesDao.updateParentDirectory(thesisId, directoryId);
return (result==0 ? new CustomErrorResolution(400) : new TextResolution("OK"));
}
public Resolution deleteDirectory() {
Directory dirToDelete = directoriesDao.getDirectory(directoryId);
Integer deleted = directoriesDao.deleteDirectoriesAndMoveTheses(directoryId);
if (deleted == 1) {
getContext().getMessages().add(new SimpleMessage("Adres�� \"{0}\" byl smaz�n", dirToDelete.getName()));
}
return new RedirectResolution(BrowseThesesActionBean.class).addParameter("directoryId", dirToDelete.getParentId());
}