Package org.opencustomer.db.vo.system

Examples of org.opencustomer.db.vo.system.UsergroupVO


    }
   
    @Override
    public void writeForm(PageStandardForm form, ActionMessages errors, HttpServletRequest request)
    {
        UsergroupVO usergroup = (UsergroupVO) getPanel().getEntity();

        form.setName(usergroup.getName());
        form.setAdmin(usergroup.isAdmin());
    }
View Full Code Here


            if (form.getMainUsergroupId() > 0)
            {
                Iterator<UsergroupVO> usergroups = editUser.getProfile().getUsergroups().iterator();
                while (usergroups.hasNext())
                {
                    UsergroupVO usergroup = usergroups.next();
                    if (usergroup.getId() == form.getMainUsergroupId())
                    {
                        editUser.getProfile().setDefaultUsergroup(usergroup);
                        break;
                    }
                }
View Full Code Here

        try
        {
            RoleVO role = (RoleVO) panel.getEntity();

            UsergroupVO usergroup = new UsergroupDAO().getById(form.getId());
           
            role.setDefaultUsergroup(usergroup);
        }
        catch (HibernateException e)
        {
View Full Code Here

                    usergroupAccess = true;
                    break;
                }
            }
            if(!usergroupAccess) {
                UsergroupVO vo = new UsergroupDAO().getById(ea.getOwnerGroup());
                usergroups.add(0, vo);
            }
            Collections.sort(usergroups, new Comparator<UsergroupVO>() {
                public int compare(UsergroupVO usergroup1, UsergroupVO usergroup2)
                {
                    return usergroup1.getName().compareTo(usergroup2.getName());
                }
            });           
            panel.setAttribute("system_usergroups", usergroups);
           
            if(ea != null) {
                UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
               
                Page activePage = panel.getActivePage();
               
                activePage.setEditable(isEditable(panel, user, ea, request));
            }
           
            UserVO ownerUser = null;
   
            if(panel.getAttribute("system_ownerUser") == null && ea.getOwnerUser() > 0) {
                if(log.isDebugEnabled())
                    log.debug("load user for owner of entity access");
               
                ownerUser = new UserDAO().getById(ea.getOwnerUser());
                panel.setAttribute("system_ownerUser", ownerUser);
            }
           
            if(ea instanceof StampedVO) {
                StampedVO vo = (StampedVO)ea;
                panel.setAttribute("system_isStamped", Boolean.TRUE);
               
                if(panel.getAttribute("system_createUser") == null && vo.getCreateUser() != null && vo.getCreateUser() > 0) {
                    UserVO user = null;
                    if(vo.getCreateUser().equals(ea.getOwnerUser())) {
                        user = ownerUser;
                    } else {
                        user = new UserDAO().getById(vo.getCreateUser());
                    }
                    panel.setAttribute("system_createUser", user);
                }
   
                if(panel.getAttribute("system_modifyUser") == null && vo.getModifyUser() != null && vo.getModifyUser() > 0) {
                    UserVO user = null;
                    if(vo.getModifyUser().equals(ea.getOwnerUser())) {
                        user = ownerUser;
                    } else if(vo.getModifyUser().equals(vo.getCreateUser())) {
                        user = ownerUser;
                    } else {
                        user = new UserDAO().getById(vo.getModifyUser());
                    }
                    panel.setAttribute("system_modifyUser", user);
                }
            }
           
View Full Code Here

        if (group <= 0)
            errors.add("group", new ActionMessage("default.error.missingInput", MessageUtil.message(request, "entity.entityAccess.groupOwner")));
        else
        {
            UsergroupVO usergroup = null;

            List<UsergroupVO> usergroups = (List<UsergroupVO>)getPanel().getAttribute("system_usergroups");
            for (UsergroupVO ug : usergroups)
            {
                if (ug.getId() == group)
View Full Code Here

TOP

Related Classes of org.opencustomer.db.vo.system.UsergroupVO

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.