Package org.nemesis.forum

Examples of org.nemesis.forum.ProfileManager


      Forum forum = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
      request.setAttribute("id", request.getParameter("id"));
      //check permission
      checkPermission(request, OperationConstants.DELETE_GROUP_PERMISSION, forum);
     
      ProfileManager manager = forumFactory.getProfileManager();
      Group group = manager.getGroup( Integer.parseInt(request.getParameter("actor")));
       
      int perm=Integer.parseInt(request.getParameter("type"));
      if(perm==Constants.FORUM_ADMIN && ! SecurityTools.isSystemAdmin(getAuthToken(request))){
         throw new UnauthorizedException();
      }
View Full Code Here


   
    try {
       
       
        ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
        ProfileManager manager = forumFactory.getProfileManager();
        User user = manager.getUser(getAuthToken(request).getUserID());
         
        Group group = manager.getGroup((String)PropertyUtils.getSimpleProperty(form, "group"));
        request.setAttribute("id",group.getID()+"";
        User  u = manager.getUser((String)PropertyUtils.getSimpleProperty(form, "username"));
        // add user as an administrator of the group
        group.addAdministrator(u);
         
       
    } catch (NotFoundException e) {
View Full Code Here

        }
       
        Vector v=new Vector();
       
        ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
        ProfileManager manager = forumFactory.getProfileManager();
    ////    User user = manager.getUser(getAuthToken(request).getUserID());
       
        int nb=manager.getGroupCount();
       
       
        GroupBean gb=null;
        Group group = null
        Iterator groupIterator = manager.groups(start,maxPageItems);
        while( groupIterator.hasNext() ) {
          group = (Group)groupIterator.next();
         
          if(!SecurityTools.isGroupAdmin(getAuthToken(request),group)){
            nb--;
View Full Code Here

      Forum forum = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
      request.setAttribute("id", request.getParameter("id"));
      //check permission
      checkPermission(request, OperationConstants.ADD_GROUP_PERMISSION, forum);
     
      ProfileManager manager = forumFactory.getProfileManager();
      Group group = manager.getGroup(request.getParameter("actor"));
       
      int perm=Integer.parseInt(request.getParameter("type"));
      if(perm==Constants.FORUM_ADMIN && ! SecurityTools.isSystemAdmin(getAuthToken(request))){
         throw new UnauthorizedException();
      }
View Full Code Here

   
    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"));
        //check permission
        checkPermission(request,OperationConstants.DELETE_GROUP_MEMBER,group);
        // add user as an administrator of the group
        group.removeMember(u);
         
View Full Code Here

   
    try {
        try {
         
          ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
          ProfileManager manager = forumFactory.getProfileManager();
          Group group = manager.getGroup(Integer.parseInt(request.getParameter("id")));
          manager.deleteGroup(group);
          errors.add("general"new ActionError("delGroup.confirm"));
         
        }
        catch( NotFoundException fnfe ) {
          errors.add("general"new ActionError("delGroup.notFound"));         
View Full Code Here

    }

    try {

      ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
      ProfileManager manager = forumFactory.getProfileManager();
      User user = manager.getUser(getAuthToken(request).getUserID());

      //retrieve the group
      Group group = manager.getGroup(Integer.parseInt(request.getParameter("id")));

      //first, populate
      if (request.getParameter("name") == null) {
        PropertyUtils.setSimpleProperty(form, "id", new Integer(group.getID()));
        PropertyUtils.setSimpleProperty(form, "name", group.getName());
View Full Code Here

  public Iterator forumsModeration() {
    return new ForumModeratorIteratorProxy(factory.forums(), authorization, permissions);
  }
 
  public ProfileManager getProfileManager() {
    ProfileManager profileManager = factory.getProfileManager();
    return new ProfileManagerProxy(profileManager, authorization, permissions);
  }
View Full Code Here

   */
  public static boolean isGroupAdmin(Authorization authToken) {
    if(isSystemAdmin(authToken)) return true;
   
    ForumFactory forumFactory = ForumFactory.getInstance(authToken);
    ProfileManager manager = forumFactory.getProfileManager();
    Iterator groupIterator = manager.groups();
    if (!groupIterator.hasNext()) {
      return false;
    }
    while (groupIterator.hasNext()) {
      Group group = (Group) groupIterator.next();
View Full Code Here

    }

    try {

      ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
      ProfileManager manager = forumFactory.getProfileManager();
      User user = manager.getUser(getAuthToken(request).getUserID());
      try {

        //retrieve the user
        User u = manager.getUser(Integer.parseInt(request.getParameter("userBean.id")));

        //first, populate
        if (request.getParameter("userBean.userName") == null) {
          UserBean ub = new UserBean();
          ub.setId(u.getID());
View Full Code Here

TOP

Related Classes of org.nemesis.forum.ProfileManager

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.