Package org.apache.turbine.om.security

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


    public Group getGroup(String groupName)
    {
        Iterator iter = set.iterator();
        while ( iter.hasNext() )
        {
            Group group = (Group)iter.next();
            if ( groupName != null  &&
                 groupName.equals( group.getName() ) )
            {
                return group;
            }
        }
        return null;
View Full Code Here


            // foreach group in the system
            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
View Full Code Here

                {
                    throw new DataBackendException(
                            "Internal error - query returned "
                            + results.size() + " rows");
                }
                Group newGroup = (Group) results.get(0);
                // add the group to system-wide cache
                getAllGroups().add(newGroup);
                // return the object with correct id
                return newGroup;
            }
View Full Code Here

            // foreach group in the system
            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
View Full Code Here

                {
                    throw new DataBackendException(
                        "Internal error - query returned "
                        + results.size() + " rows");
                }
                Group newGroup = (Group) results.get(0);
                // add the group to system-wide cache
                getAllGroups().add(newGroup);
                // return the object with correct id
                return newGroup;
            }
View Full Code Here

        //
        // Wrap the returned Objects into the configured Peer Objects.
        //
        for (Iterator it = list.iterator(); it.hasNext(); )
        {
            Group dr = getNewGroup((Persistent) it.next());
            newList.add(dr);
        }

        return newList;
    }
View Full Code Here

     *
     */

    public static Group getNewGroup(Persistent p)
    {
        Group g = null;
        try
        {
            Class groupWrapperClass = TurbineSecurity.getGroupClass();

            Class [] clazz = new Class [] { Persistent.class };
View Full Code Here

            // 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

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.