Package org.apache.turbine.om.security

Examples of org.apache.turbine.om.security.Group


            // foreach group in the system
            Iterator groupsIterator = getAllGroups().iterator();

            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)
View Full Code Here


                Attributes attribs = sr.getAttributes();
                Attribute attr = attribs.get("turbineGroupName");

                if (attr != null && attr.get() != null)
                {
                    Group group = getNewGroup(attr.get().toString());

                    groups.add(group);
                }
            }
        }
View Full Code Here

            throws DataBackendException, UnknownEntityException
    {
        Iterator groupsIterator = getAllGroups().iterator();
        while (groupsIterator.hasNext())
        {
            Group group = (Group) groupsIterator.next();
            Iterator rolesIterator = getRoles(user, group).iterator();
            while (rolesIterator.hasNext())
            {
                Role role = (Role) rolesIterator.next();
                revoke(user, group, role);
View Full Code Here

    public boolean add(Collection groups)
    {
        boolean res = false;
        for (Iterator it = groups.iterator(); it.hasNext();)
        {
            Group g = (Group) it.next();
            res |= add(g);
        }
        return res;
    }
View Full Code Here

    public boolean add(GroupSet groupSet)
    {
        boolean res = false;
        for( Iterator it = groupSet.iterator(); it.hasNext();)
        {
            Group g = (Group) it.next();
            res |= add(g);
        }
        return res;
    }
View Full Code Here

        StringBuffer sb = new StringBuffer();
        sb.append("GroupSet: ");

        for(Iterator it = iterator(); it.hasNext();)
        {
            Group g = (Group) it.next();
            sb.append('[');
            sb.append(g.getName());
            sb.append(" -> ");
            sb.append(g.getIdAsObj());
            sb.append(']');
            if (it.hasNext())
            {
                sb.append(", ");
            }
View Full Code Here

        assertNotNull(user);

        AccessControlList acl = ss.getACL(user);
        assertNotNull(acl);

        Group turbine = ss.getGroupByName("Turbine");
        assertNotNull(turbine);

        assertEquals(0, acl.getRoles().size());
        assertEquals(1, acl.getRoles(turbine).size());
        assertEquals(0, acl.getPermissions().size());
View Full Code Here

     * @throws UnknownEntityException if the object could not be instantiated.
     */
    public Group getGroupInstance()
            throws UnknownEntityException
    {
        Group group;
        try
        {
            group = (Group) getGroupClass().newInstance();
        }
        catch (Exception e)
View Full Code Here

     * @throws UnknownEntityException if the object could not be instantiated.
     */
    public Group getGroupInstance(String groupName)
            throws UnknownEntityException
    {
        Group group = getGroupInstance();
        group.setName(groupName);
        return group;
    }
View Full Code Here

     * @throws UnknownEntityException if the group does not exist.
     */
    public Group getGroupByName(String name)
            throws DataBackendException, UnknownEntityException
    {
        Group group = getAllGroups().getGroupByName(name);
        if (group == null)
        {
            throw new UnknownEntityException(
                    "The specified group does not exist");
        }
View Full Code Here

TOP

Related Classes of org.apache.turbine.om.security.Group

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.