Examples of RoleSet


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

        {
            throw new DataBackendException(
                    "NamingException caught:", ex);
        }

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

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

        catch (NamingException ex)
        {
            throw new DataBackendException("NamingException caught", 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

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

            for (Iterator groupsIterator = getAllGroups().iterator();
                 groupsIterator.hasNext();)
            {
                Group group = (Group) groupsIterator.next();
                // get roles of user in the group
                RoleSet groupRoles = RolePeer.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

     * @return an object representing the Role with specified name.
     */
    public Role getRole( String name )
        throws DataBackendException, UnknownEntityException
    {
        RoleSet roles = getAllRoles();
        Role role = roles.getRole(name);
        if(role != null)
        {
            role.setPermissions(getPermissions(role));
            return role;
        }
View Full Code Here

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

    * Retrieves/assembles a RoleSet based on the Criteria passed in
    */
    public static RoleSet retrieveSet(Criteria criteria) throws Exception
    {
        Vector results = RolePeer.doSelect(criteria);
        RoleSet rs = new RoleSet();
        for (int i=0; i<results.size(); i++)
        {
            rs.add( (Role)results.elementAt(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.