Examples of ForumFactory


Examples of org.eclipse.ecf.internal.provider.vbulletin.internal.ForumFactory

    Matcher matcher = PAT_FORUM.matcher(seq);
    while (matcher.find()) {
      String name = StringUtil.stripHTMLTrim(matcher.group(2));
      // String desc = StringUtil.stripHTMLTrim(matcher.group(3));
      if (StringUtil.notEmptyStr(name)) {
        ForumFactory ff = new ForumFactory();
        String idStr = matcher.group(1);
        ID id = null;
        try {
          id = ff.createBBObjectId(namespace, baseURL, idStr);
        } catch (NumberFormatException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        } catch (IDCreateException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
        Forum forum = (Forum) ff.createBBObject(id, name, null);
        // forum.setDescription(desc);
        forums.put(id, forum);
      }
    }
    return forums;
View Full Code Here

Examples of org.eclipse.ecf.internal.provider.vbulletin.internal.ForumFactory

      throws BBException {
    Thread t = (Thread) genericParser.parseSingleIdName(PD_THREAD_ATTRS,
        seq, new ThreadFactory());
    if (t != null) {
      Map<ID, IBBObject> forums = genericParser.parseMultiIdName(
          PD_THREAD_ATTRS_FORUM, seq, new ForumFactory(), true);
      Forum prev = null;
      Forum f = null;
      for (IBBObject obj : forums.values()) {
        f = (Forum) obj;
        if (prev != null) {
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

    }

  }

  public static void flush(Authorization auth) throws UnauthorizedException{
    ForumFactory forumFactory = ForumFactory.getInstance(auth);
    if(! forumFactory.getPermissions(auth).get(Constants.SYSTEM_ADMIN)) throw new UnauthorizedException();
    try {
      IndexWriter writer = new IndexWriter(new File(PATH), new StopAnalyzer(), true);
      writer.close();
    } catch (IOException e) {
      log.error("impossible de flusher l'index ", e);
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

      log.error("impossible de flusher l'index ", e);
    }
  }
 
  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.ForumFactory

  /**
   * @param b
   */
  public static void setAutoIndex(boolean b,Authorization auth) throws UnauthorizedException {
    ForumFactory forumFactory = ForumFactory.getInstance(auth);
    if(! forumFactory.getPermissions(auth).get(Constants.SYSTEM_ADMIN)) throw new UnauthorizedException();
    autoIndex = b;
  }
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

   
   
    try {
       
       
        ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
        ProfileManager manager = forumFactory.getProfileManager();
        User user = manager.getUser(getAuthToken(request).getUserID());
         
        Group group = manager.getGroup(request.getParameter("group"));
        request.setAttribute("id",group.getID()+"";
        User  u = manager.getUser(request.getParameter("username"));
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

    ActionErrors errors = new ActionErrors();
   
    try {
        try {
         
          ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
          ProfileManager manager = forumFactory.getProfileManager();
          Forum f = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
          forumFactory.deleteForum(f);
         
          errors.add("general"new ActionError("delForum.confirm"));
         
        }
        catch( NotFoundException fnfe ) {
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

    checkPermission(request,OperationConstants.MANAGE_CACHE);
   
    ActionErrors errors = new ActionErrors();
   
    try {
        ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
        DbForumFactory dbForumFactory = null;
        dbForumFactory = (DbForumFactory)((ForumFactoryProxy)forumFactory).getUnderlyingForumFactory();
        DbCacheManager cacheManager = dbForumFactory.getCacheManager();
 
        //action
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

   
   
    ActionErrors errors = new ActionErrors();
   
    try {
        ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
        Forum forum = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
        //check permission
        checkPermission(request,OperationConstants.LIST_FORUM_CONTENT,forum);
       
        ForumThread t=forum.getThread(Integer.parseInt(request.getParameter("threadID")));
        t.setApproved(!t.isApproved());
View Full Code Here

Examples of org.nemesis.forum.ForumFactory

    ActionErrors errors = new ActionErrors();
   
    try {
        try {
         
          ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
          ProfileManager manager = forumFactory.getProfileManager();
          User u = manager.getUser(Integer.parseInt(request.getParameter("id")));
          manager.deleteUser(u);
          errors.add("general"new ActionError("delUser.confirm"));
         
        }
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.