Package org.opencustomer.db.vo.system

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


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

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


        try
        {
            UserVO user = (UserVO) panel.getEntity();

            RoleVO role = new RoleDAO().getById(form.getId());
           
            if(user.getProfile().getLdapGroup() == null && user.getProfile().getRole() == null || user.getProfile().getRole().isAdmin() != role.isAdmin()) {
                user.getProfile().getUsergroups().clear();
                user.getProfile().getUsergroups().add(role.getDefaultUsergroup());
                user.getProfile().setDefaultUsergroup(role.getDefaultUsergroup());
            }
           
            user.getProfile().setRole(role);
           
            if(role.isAdmin())
                user.setPerson(null);
        }
        catch (HibernateException e)
        {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("default.error.invalidEntity", new Integer(form.getId())));
View Full Code Here

            return mapping.findForward("addUsergroup");
        else if (form.getDoAddRole().isSelected())
            return mapping.findForward("addRole");
        else if (form.getDoJumpRole().isSelected())
        {
            RoleVO role = ((UserVO)getPanel().getEntity()).getProfile().getRole();
           
            request.setAttribute("external_role_id", role.getId());
           
            return Panel.getForward(getPanel().getAction(Action.Type.SAVE).getAction(), request);
        }
        else if (form.getDoJumpUsergroup() > 0)
        {
View Full Code Here

        if (log.isDebugEnabled())
            log.debug("add usergroup with ID: " + form.getId());

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

            UsergroupVO usergroup = new UsergroupDAO().getById(form.getId());
           
            role.setDefaultUsergroup(usergroup);
        }
        catch (HibernateException e)
        {
            errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("default.error.invalidEntity", new Integer(form.getId())));
View Full Code Here

        }
    }
   
    @Override
    protected boolean isAdmin(EntityPanel panel) {
        RoleVO role = (RoleVO) panel.getEntity();

        return role.isAdmin();
    }
View Full Code Here

TOP

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

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.