Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.Group


        if (null == groupPrincipal) {
            throw new SecurityException(
                SecurityException.GROUP_DOES_NOT_EXIST.create(groupFullPathName));
        }
        Preferences preferences = Preferences.userRoot().node(fullPath);
        Group group = new GroupImpl(groupPrincipal, preferences);
        return group;
    }
View Full Code Here


        List groups = new LinkedList();
        Iterator groupPrincipals = groupSecurityHandler.getGroupPrincipals(filter).iterator();
        while (groupPrincipals.hasNext())
        {
            String groupName = ((Principal) groupPrincipals.next()).getName();
            Group group = getGroup(groupName);
            groups.add(group);
        }
        return groups.iterator();
    }
View Full Code Here

            // TODO: need to try to normalize List/Collection/Iterators
            List list = new ArrayList();
            while (groups.hasNext())
            {
                Group group = (Group)groups.next();
               
                Principal principal = group.getPrincipal();               
                list.add(principal.getName());
            }           
           
            BrowserIterator iterator = new DatabaseBrowserIterator(
                    list, resultSetTitleList, resultSetTypeList,
View Full Code Here

            resultSetTitleList.add("Group");

            List list = new ArrayList();
            while (groups.hasNext())
            {
                Group group = (Group)groups.next();
               
                Principal principal = group.getPrincipal();               
                list.add(principal.getName());
            }           
           
            BrowserIterator iterator = new DatabaseBrowserIterator(
                    list, resultSetTitleList, resultSetTypeList,
View Full Code Here

        if (request.getPortletMode() == PortletMode.VIEW)
        {
            String selected = request.getParameter("group");
            if (selected != null)
            {
                Group group = lookupGroup(selected);
                if (group != null)
                {
                    PortletMessaging.publish(request, SecurityResources.TOPIC_GROUPS, SecurityResources.MESSAGE_SELECTED, selected);
                    PortletMessaging.publish(request, SecurityResources.TOPIC_GROUPS, SecurityResources.MESSAGE_CHANGED, selected);
                }
View Full Code Here

                    {
                        groups = new LinkedList();
                        Iterator fullGroups = groupManager.getGroups("");
                        while (fullGroups.hasNext())
                        {
                            Group group = (Group)fullGroups.next();
                            groups.add(group.getPrincipal().getName());
                        }
                        request.getPortletSession().setAttribute(GROUPS_CONTROL, groups);
                    }
                }
                catch (SecurityException se)
                {
                    throw new PortletException(se);
                }       
                ArrayList selectableGroups = new ArrayList(groups);
                Iterator groupsIter = userGroups.iterator();
                while ( groupsIter.hasNext() )
                {
                    Group group = (Group)groupsIter.next();
                    int index = selectableGroups.indexOf(group.getPrincipal().getName());
                    if (index != -1)
                    {
                        selectableGroups.remove(index);
                    }
                }
View Full Code Here

        if (null == groupPrincipal) {
            throw new SecurityException(
                SecurityException.GROUP_DOES_NOT_EXIST.create(groupFullPathName));
        }
        Preferences preferences = Preferences.userRoot().node(fullPath);
        Group group = new GroupImpl(groupPrincipal, preferences);
        return group;
    }
View Full Code Here

        List groups = new LinkedList();
        Iterator groupPrincipals = groupSecurityHandler.getGroupPrincipals(filter).iterator();
        while (groupPrincipals.hasNext())
        {
            String groupName = ((Principal) groupPrincipals.next()).getName();
            Group group = getGroup(groupName);
            groups.add(group);
        }
        return groups.iterator();
    }
View Full Code Here

    /**
     * @see org.apache.jetspeed.security.GroupManager#addGroup(java.lang.String, boolean)
     */
    public Group addGroup(String groupName, boolean mapped) throws SecurityException
    {
        Group group = newGroup(groupName, mapped);
       
        super.addPrincipal(group, null);
           
        if (log.isDebugEnabled())
            log.debug("Added group: " + groupName);
View Full Code Here

    /**
     * @see org.apache.jetspeed.security.GroupManager#getGroup(java.lang.String)
     */
    public Group getGroup(String groupName) throws SecurityException
    {
        Group group = (Group) super.getPrincipal(groupName);
       
        if (null == group)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.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.