Package org.apache.turbine.util.security

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


        }
        catch(Exception e)
        {
            throw new DataBackendException("getPermissions(Criteria) failed", e);
        }
        return new PermissionSet(permissions);
    }
View Full Code Here


                // 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
                            = PermissionPeer.retrieveSet(role);
                    groupPermissions.add(rolePermissions);
                }
                // put the Set into permissions(group)
                permissions.put(group, groupPermissions);
View Full Code Here

        catch (Exception e)
        {
            throw new DataBackendException(
                    "getPermissions(Criteria) failed", e);
        }
        return new PermissionSet(permissions);
    }
View Full Code Here

     */
    public static PermissionSet retrieveSet(Criteria criteria)
        throws Exception
    {
        List results = doSelect(criteria);
        PermissionSet ps = new PermissionSet();

        for(Iterator it = results.iterator(); it.hasNext(); )
        {
            ps.add((Permission) it.next());
        }
        return ps;
    }
View Full Code Here

                // 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 =
                        PermissionPeerManager.retrieveSet(role);
                    groupPermissions.add(rolePermissions);
                }
                // put the Set into permissions(group)
                permissions.put(group, groupPermissions);
View Full Code Here

        catch (Exception e)
        {
            throw new DataBackendException(
                "getPermissions(Criteria) failed", e);
        }
        return new PermissionSet(permissions);
    }
View Full Code Here

                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
                    PermissionSet rolePermissions = getPermissions(role);

                    groupPermissions.add(rolePermissions);
                }
                // put the Set into permissions(group)
                permissions.put(group, groupPermissions);
View Full Code Here

        catch (NamingException ex)
        {
            throw new DataBackendException(
                    "The LDAP server specified is unavailable", ex);
        }
        return new PermissionSet(permissions);
    }
View Full Code Here

        catch (NamingException ex)
        {
            throw new DataBackendException(
                    "The LDAP server specified is unavailable", ex);
        }
        return new PermissionSet(permissions.values());
    }
View Full Code Here

     * @throws UnkownEntityException if the role or a permission is not found.
     */
    public void revokeAll(Role role)
            throws DataBackendException, UnknownEntityException
    {
        PermissionSet permissions = getPermissions(role);
        Iterator permIterator = permissions.iterator();
        while (permIterator.hasNext())
        {
            Permission perm = (Permission) permIterator.next();
            revoke(role, perm);
        }
View Full Code Here

TOP

Related Classes of org.apache.turbine.util.security.PermissionSet

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.