Package org.opencustomer.db.vo.system

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


    public Authenticator(UserVO user)
    {
        Iterator it = user.getProfile().getRole().getRights().iterator();
        while (it.hasNext())
        {
            RightVO right = (RightVO) it.next();

            StringBuilder builder = new StringBuilder();
            builder.append(right.getRightGroup().getRightArea().getLabel());
            builder.append(".");
            builder.append(right.getRightGroup().getLabel());
            builder.append(".");
            if (RightVO.Type.OTHER.equals(right.getType()))
                builder.append(right.getLabel());
            else
                builder.append(right.getType());

            if (log.isDebugEnabled())
                log.debug("add right to authenticator: " + builder.toString());

            rights.add(Right.parseRight(builder.toString()));
View Full Code Here


        return RightVO.class;
    }

    public RightVO getReadRightForRightGroup(RightGroupVO rightGroup)
    {
        RightVO right = null;

        try
        {
            StringBuilder hql = new StringBuilder();
            hql.append(" FROM ").append(getEntityClass().getName()).append(" e ");
View Full Code Here

        int[] rightIds = new int[role.getRights().size()];
        int pos = 0;
        Iterator<RightVO> it = role.getRights().iterator();
        while (it.hasNext())
        {
            RightVO right = it.next();
            rightIds[pos++] = right.getId().intValue();
        }
        form.setRights(rightIds);
        if (log.isDebugEnabled())
        {
            StringBuilder ids = new StringBuilder();
View Full Code Here

        for (int i = 0; i < form.getRights().length; i++)
        {
            // f�ge die neuen Rechte hinzu
            try
            {
                RightVO right = new RightDAO().getById(new Integer(form.getRights()[i]));
                role.getRights().add(right);
                if (log.isDebugEnabled())
                    log.debug("added right: " + right);
            }
            catch (HibernateException e)
            {
                log.error("could not load role for id: " + form.getRights()[i], e);
            }
        }
       
        // f�ge alle fehlenden Lese-Rechte hinzu
        HashSet<RightVO> missingRights = new HashSet<RightVO>();
        for(RightVO right : role.getRights()) {
            if(RightVO.Type.WRITE.equals(right.getType())) {
                RightVO readRight = new RightDAO().getReadRightForRightGroup(right.getRightGroup());
                if(!role.getRights().contains(readRight)) {
                    missingRights.add(readRight);
                }
            }
        }
View Full Code Here

TOP

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

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.