Examples of RoleSet


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

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

            Iterator groupsIterator = getAllGroups().elements();
            while(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 permissoins in this group
                PermissionSet groupPermissions = new PermissionSet();
                // foreach role in Set
                Iterator rolesIterator = groupRoles.elements();
                while(rolesIterator.hasNext())
                {
                    Role role = (Role)rolesIterator.next();
                    // get permissions of the role
                    PermissionSet rolePermissions = PermissionPeer.retrieveSet(role);
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.