Examples of RoleSet


Examples of org.apache.turbine.util.security.RoleSet

     * @throws DataBackendException if there is an error with LDAP
     */
    public boolean checkExists(Role role)
            throws DataBackendException
    {
        RoleSet roleSet = getRoles(new Criteria());

        return roleSet.contains(role);
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

    public void testAllRoles()
            throws Exception
    {
        SecurityService ss = TurbineSecurity.getService();

        RoleSet gs = ss.getAllRoles();

        assertEquals(2, gs.size());
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

      throws Exception
    {
        SecurityService ss = TurbineSecurity.getService();

        GroupSet gs = ss.getAllGroups();
        RoleSet rs = ss.getAllRoles();
        PermissionSet ps = ss.getAllPermissions();

        List users = ss.getUserManager().retrieveList(new org.apache.torque.util.Criteria());

        assertEquals("Group DB Wrong!", gs.size(), 2);
        assertEquals("Role DB Wrong!", rs.size(), 2);
        assertEquals("Permission DB Wrong!", ps.size(), 3);
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

            for (Iterator groupsIterator = getAllGroups().iterator();
                 groupsIterator.hasNext();)
            {
                Group group = (Group) groupsIterator.next();
                // get roles of user in the group
                RoleSet groupRoles = RolePeerManager.retrieveSet(user, group);
                // put the Set into roles(group)
                roles.put(group, groupRoles);
                // collect all permissions in this group
                PermissionSet groupPermissions = new PermissionSet();
                // foreach role in Set
                for (Iterator rolesIterator = groupRoles.iterator();
                     rolesIterator.hasNext();)
                {
                    Role role = (Role) rolesIterator.next();
                    // get permissions of the role
                    PermissionSet rolePermissions =
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

        }
        catch (Exception e)
        {
            throw new DataBackendException("getRoles(Criteria) failed", e);
        }
        return new RoleSet(roles);
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

            while (groupsIterator.hasNext())
            {
                Group group = (Group) groupsIterator.next();

                // get roles of user in the group
                RoleSet groupRoles = getRoles(user, group);

                // put the Set into roles(group)
                roles.put(group, groupRoles);
                // collect all permissoins in this group
                PermissionSet groupPermissions = new PermissionSet();
                // foreach role in Set
                Iterator rolesIterator = groupRoles.iterator();

                while (rolesIterator.hasNext())
                {
                    Role role = (Role) rolesIterator.next();
                    // get permissions of the role
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

        catch (UnknownEntityException ex)
        {
            throw new DataBackendException("Role instance could not be created.", ex);
        }

        return new RoleSet(roles);
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

        catch (UnknownEntityException ex)
        {
            throw new DataBackendException("Role instance could not be created.", ex);
        }

        return new RoleSet(roles);
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

     * @throws DataBackendException if there is an error with LDAP
     */
    public boolean checkExists(Role role)
            throws DataBackendException
    {
        RoleSet roleSet = getRoles(new Criteria());

        return roleSet.contains(role);
    }
View Full Code Here

Examples of org.apache.turbine.util.security.RoleSet

     * @exception Exception a generic exception.
     */
    public static RoleSet retrieveSet(Criteria criteria) throws Exception
    {
        List results = RolePeer.doSelect(criteria);
        RoleSet rs = new RoleSet();
        for (int i = 0; i < results.size(); i++)
        {
            rs.add((Role) results.get(i));
        }
        return rs;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.