Package org.jresearch.gossip.dao

Examples of org.jresearch.gossip.dao.ForumDAO


                new MailProcessor()));
        DataSource ds;
        //Setting Up Datasource
        try {
            ds = setupDataSource();
            ForumDAO dao = ForumDAO.getInstance();
            dao.setDataSource(ds);
            UserDAO udao = UserDAO.getInstance();
            udao.setDataSource(ds);
        } catch (IOException e) {
            throw new ServletException(e);
        } catch (Exception e) {
View Full Code Here


    public void attributeAdded(HttpSessionBindingEvent evt) {
        if (evt.getName().equals(IConst.SESSION.USER_KEY)) {
            HttpSession session = evt.getSession();
            cleanUpPermissions(session);
            ServletContext app = session.getServletContext();
            ForumDAO forumdao = ForumDAO.getInstance();
            User user = (User) evt.getSession().getAttribute(
                    IConst.SESSION.USER_KEY);

            try {
                savePermissionGuard(session);
                if (user.getStatus() > 0) {
                    forumdao.removeEntry(user.getName());
                }

                forumdao.addEntry(getCurrentEntry(evt));

                //write message in forum log
                JGossipLog.audit(LogLevel.INFO, user, ((MessageResources) app
                        .getAttribute(Globals.MESSAGES_KEY
                                + Configurator.getInstance().get(
View Full Code Here

            ServletContext app = session.getServletContext();

            User user = (User) evt.getValue();

            UserDAO dao = UserDAO.getInstance();
            ForumDAO forumdao = ForumDAO.getInstance();

            try {
                forumdao.removeEntry(session.getId());

                if (user.getStatus() != UserStatus.GUEST) {
                    dao.updateIntime(user.getName());
                }
                //              write message in forum log
View Full Code Here

        if (evt.getName().equals(IConst.SESSION.USER_KEY)) {
            HttpSession session = evt.getSession();
            cleanUpPermissions(session);
            ServletContext app = session.getServletContext();

            ForumDAO forumdao = ForumDAO.getInstance();
            User user = (User) evt.getSession().getAttribute(
                    IConst.SESSION.USER_KEY);

            try {

                if (user.getStatus() > 0) {
                    forumdao.removeEntry(user.getName());
                }

                if (!forumdao.isEntryExist(session.getId())) {
                    forumdao.addEntry(getCurrentEntry(evt));
                } else {
                    forumdao.updateEntry(getCurrentEntry(evt));
                }
                savePermissionGuard(session);
            } catch (SQLException sqle) {
                sqle.printStackTrace();
            } catch (SystemException e) {
View Full Code Here

TOP

Related Classes of org.jresearch.gossip.dao.ForumDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.