Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.Group


            // 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, "group", "selected", selected);
                    PortletMessaging.publish(request, "group", "change", selected);
                }
            }
            String refresh = request.getParameter("group.refresh");
            String save = request.getParameter("group.save");
            String neue = request.getParameter("group.new");
            String delete = request.getParameter("groupDelete");
           
            if (refresh != null)
            {
                this.clearBrowserIterator(request);
            }
            else if (neue != null)
            {
                PortletMessaging.cancel(request, "group", "selected");
            }
            else if (delete != null && (!(isEmpty(delete))))
            {
                try
                {
                    Group group = lookupGroup(delete);
                    if (group != null)
                    {
                        groupManager.removeGroup(delete);
                        this.clearBrowserIterator(request);
                        PortletMessaging.cancel(request, "group", "selected");
                        PortletMessaging.publish(request, SecurityResources.USER_BROWSER, "groups", "refresh");
                    }
                }
                catch (Exception e)
                {
                    publishStatusMessage(request, "GroupBrowser", "status", e, "Could not remove group");
                }
            }
            else if (save != null)
            {
                String groupName = request.getParameter("group.name");               
                if (!(isEmpty(groupName)))
                {
                    try
                    {
                        Group group = null;
                        String old = (String)PortletMessaging.receive(request, "group", "selected");
                        if (old != null)
                        {
                            group = lookupGroup(old);
                        }
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

        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

        {
            Iterator groups = groupManager.getGroups(filter);
                       
            while (groups.hasNext())
            {
                Group group = (Group)groups.next();
               
                Principal principal = group.getPrincipal();               
                list.add(principal.getName());
            }  
        }
        catch (SecurityException sex)
        {
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.