Examples of Forum


Examples of org.jresearch.gossip.beans.forum.Forum

        ProcessForumForm pfForm = (ProcessForumForm) form;

        try {
           

            Forum forum = dao.getForumInfo(Integer.parseInt(pfForm.getFid()));
            ForumForm forumForm = new ForumForm();
            forumForm.setForum_desc(forum.getDescription());
            forumForm.setForum_name(forum.getTitle());
            forumForm.setForumid(pfForm.getFid());
            forumForm.setGroupid(Integer.toString(forum.getGroupid()));
            forumForm.setForum_sort(forum.getSort());
            request.setAttribute("forumForm", forumForm);
        } catch (SQLException sqle) {
            getServlet().log("Connection.process", sqle);
            throw new SystemException(sqle);
        }
View Full Code Here

Examples of org.jresearch.gossip.beans.forum.Forum

        try {
           

            boolean isUserMod = dao.checkMod(Integer.parseInt(
                        messageForm.getFid()), user);
            Forum currForum = dao.getForumInfo(Integer.parseInt(
                        messageForm.getFid()));

            //      check access rights if forum invisible
            if ((currForum.getLocked() == IConst.Forum.STATUS_INVISIBLE) &&
                    (user.getStatus() < Integer.parseInt(
                        Configurator.getInstance().get(IConst.CONFIG.INVADER1)))) {
                return (mapping.findForward(IConst.TOKEN.DENIED));
            }

            Topic currThread = dao.getThreadInfo(Integer.parseInt(
                        messageForm.getTid()));

            // check user access rights if current topic or completely forum is locked
            if (((currThread.getLocked() == IConst.Topic.STATUS_LOCKED) ||
                    (currForum.getLocked() == IConst.Forum.STATUS_COMPLETELY_LOCKED)) &&
                    (!isUserMod)) {
                return (mapping.findForward(IConst.TOKEN.DENIED));
            }

            Message mess = dao.getMessage(messageForm.getMid());
View Full Code Here

Examples of org.jresearch.gossip.beans.forum.Forum

    public Forum getForumInfo(int forumid) throws SQLException {
        Connection connection = this.dataSource.getConnection();
        PreparedStatement st = connection.prepareStatement(dbDriver
                .getQueries().getForumQueries().getSql_FORUM_INFO());
        ResultSet rs = null;
        Forum _forum = new Forum();

        try {
            st.setInt(1, forumid);
            rs = (ResultSet) st.executeQuery();

            if (rs.next()) {
                _forum.setLocked(rs.getInt("locked"));
                _forum.setTitle(rs.getString("forumtitle"));
                _forum.setDescription(rs.getString("forumdesc"));
                _forum.setSort(rs.getString("forum_sort"));
                _forum.setGroupid(rs.getInt("groupid"));
            }

            return _forum;
        } finally {
            if (rs != null) {
View Full Code Here

Examples of org.jresearch.gossip.beans.forum.Forum

        try {
            st.setInt(1, group.getGroupid());
            rs = (ResultSet) st.executeQuery();

            while (rs.next()) {
                Forum forum = new Forum();
                forum.setDescription(rs.getString("forumdesc"));
                forum.setForumid(rs.getInt("forumid"));
                forum.setLocked(rs.getInt("locked"));
                forum.setTitle(rs.getString("forumtitle"));

                if (filled) {
                    forum.setThreadsCount(countForumTopics(forum.getForumid(),
                            st3));
                    setLastMessage(forum, st2);
                }

                group.addForum(forum);
View Full Code Here

Examples of org.jresearch.gossip.beans.forum.Forum

            while (rs.next()) {
                if (rs.getInt("gid") != gid) {
                    gid = rs.getInt("gid");

                    Forum f = new Forum();
                    f.setTitle(IConst.JSP.OPTIONS_SEPERATOR);
                    forumsForMod.add(f);
                }

                Forum f = new Forum();
                f.setForumid(rs.getInt("fid"));
                f.setTitle(rs.getString("forumtitle"));
                forumsForMod.add(f);
            }
        } finally {
            if (rs != null) {
                rs.close();
View Full Code Here

Examples of org.jresearch.gossip.beans.forum.Forum

        try {
            st.setString(1, login);
            rs = st.executeQuery();

            while (rs.next()) {
                Forum f = new Forum();
                f.setForumid(rs.getInt("forumid"));
                f.setTitle(rs.getString("forumtitle"));
                userModForums.add(f);
            }
        } finally {
            if (rs != null) {
                rs.close();
View Full Code Here

Examples of org.nemesis.forum.Forum

    //Dummy call to super-class. This specialized iterator proxy doesn't
    //use the superclass like the other iterators do.
    super(iterator, authorization, permissions);

    while (iterator.hasNext()) {
      Forum forum = (Forum) iterator.next();
      ForumPermissions forumPermissions =
        forum.getPermissions(authorization);
      //Create a new permissions object with the combination of the
      //permissions of this object and tempPermissions.
      //Check and see if the user has READ permissions. If not, throw an
      //an UnauthorizedException.
     
View Full Code Here

Examples of org.nemesis.forum.Forum

  public static void reindex(Authorization auth) throws UnauthorizedException{
    ForumFactory forumFactory = ForumFactory.getInstance(auth);
    if(! forumFactory.getPermissions(auth).get(Constants.SYSTEM_ADMIN)) throw new UnauthorizedException();
    //ok system admin
    flush(auth);
    Forum f=null;
    ForumThread ft=null;
    for(Iterator it=forumFactory.forums();it.hasNext();){
      f=(Forum)it.next();
      for(Iterator it2=f.threads();it2.hasNext();){
        ft=(ForumThread)it2.next();
        index(ft.getRootMessage());
      }
    }
   
View Full Code Here

Examples of org.nemesis.forum.Forum

  }

  //FROM THE FORUMFACTORY INTERFACE//

  public Forum createForum(String name, String description) throws UnauthorizedException, ForumAlreadyExistsException {
    Forum newForum = null;
    try {
      Forum existingForum = getForum(name);

      //The forum already exists since now exception, so:
      throw new ForumAlreadyExistsException();
    } catch (ForumNotFoundException fnfe) {
      //The forum doesn't already exist so we can create a new one
View Full Code Here

Examples of org.nemesis.forum.Forum

  }

  public Forum getForum(String name) throws ForumNotFoundException, UnauthorizedException {
    //If cache is not enabled, do a new lookup of object
    if (!cacheManager.isCacheEnabled()) {
      Forum forum = new DbForum(name, this);
      return forum;
    }
    //Cache is enabled.
    CacheableInteger forumIDInteger = (CacheableInteger) cacheManager.get(DbCacheManager.FORUM_ID_CACHE, name);
    //if id wan't found in cache, load it up and put it there.
    if (forumIDInteger == null) {
      Forum forum = new DbForum(name, this);
      forumIDInteger = new CacheableInteger(new Integer(forum.getID()));
      cacheManager.add(DbCacheManager.FORUM_ID_CACHE, name, forumIDInteger);
    }
    return getForum(forumIDInteger.getInteger().intValue());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.