Package org.nemesis.forum.webapp.admin.bean

Examples of org.nemesis.forum.webapp.admin.bean.GroupUsersBean


         
          Group group = manager.getGroup(Integer.parseInt(gid));
          //check permission
          checkPermission(request,OperationConstants.LIST_GROUP_USERS, group);
          //populate bean
          GroupUsersBean b=new GroupUsersBean();
          b.setId(group.getID());
          b.setName(group.getName());
          b.setDescription(group.getDescription());
          b.setNumAdmins(group.getAdministratorCount());
          b.setNumMembers(group.getMemberCount()) ;
         
          User u=null;
          UserBean ub=null;
          for(Iterator it=group.administrators();it.hasNext();){
            u=(User)it.next();
            ub = new UserBean();
            ub.setId(u.getID());
            ub.setName(u.getName());
            ub.setUserName(u.getUsername());
            ub.setEmail(u.getEmail());
            b.addAdmin(ub);
          }
          for(Iterator it=group.members();it.hasNext();){
            u=(User)it.next();
            ub = new UserBean();
            ub.setId(u.getID());
            ub.setName(u.getName());
            ub.setUserName(u.getUsername());
            ub.setEmail(u.getEmail());
            b.addMember(ub);
          }
          request.setAttribute("gp",b);
          request.setAttribute("isSystemAdmin",new Boolean(SecurityTools.isSystemAdmin(getAuthToken(request))));
        }
        catch( NumberFormatException aee ) {
View Full Code Here

TOP

Related Classes of org.nemesis.forum.webapp.admin.bean.GroupUsersBean

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.