use of net.jforum.dao.CategoryDAO in project jforum2 by rafaelsteil.
the class ForumAction method insert.
// One more, one more
public void insert() {
CategoryDAO cm = DataAccessDriver.getInstance().newCategoryDAO();
this.context.put("groups", new TreeGroup().getNodes());
this.context.put("selectedList", new ArrayList());
this.setTemplateName(TemplateKeys.FORUM_ADMIN_INSERT);
this.context.put("categories", cm.selectAll());
this.context.put("action", "insertSave");
}
use of net.jforum.dao.CategoryDAO in project jforum2 by rafaelsteil.
the class ForumStartup method startForumRepository.
/**
* Starts the cache control for forums and categories.
* @throws RepositoryStartupException is something were wrong.
*/
public static void startForumRepository() {
try {
ForumDAO fm = DataAccessDriver.getInstance().newForumDAO();
CategoryDAO cm = DataAccessDriver.getInstance().newCategoryDAO();
ConfigDAO configModel = DataAccessDriver.getInstance().newConfigDAO();
ForumRepository.start(fm, cm, configModel);
} catch (Exception e) {
log.error("Unable to bootstrap JForum repository.", e);
throw new RepositoryStartupException("Error while trying to start ForumRepository: " + e, e);
}
}
use of net.jforum.dao.CategoryDAO in project jforum2 by rafaelsteil.
the class ForumAction method edit.
// Edit
public void edit() {
int forumId = this.request.getIntParameter("forum_id");
ForumDAO forumDao = DataAccessDriver.getInstance().newForumDAO();
CategoryDAO cm = DataAccessDriver.getInstance().newCategoryDAO();
this.setTemplateName(TemplateKeys.FORUM_ADMIN_EDIT);
this.context.put("categories", cm.selectAll());
this.context.put("action", "editSave");
this.context.put("forum", forumDao.selectById(forumId));
// Mail Integration
// MailIntegrationDAO integrationDao = DataAccessDriver.getInstance().newMailIntegrationDAO();
// this.context.put("mailIntegration", integrationDao.find(forumId));
}
Aggregations