Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.Group


        {
            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


        if (request.getPortletMode() == PortletMode.VIEW)
        {
            String selected = request.getParameter("group");
            if (selected != null)
            {
                Group group = lookupGroup(request, 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

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

                    {
                        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

          try
          {
            if (!(groupManager.groupExists(name)))
              groupManager.addGroup(name);
            Group group = groupManager.getGroup(name);
            this.groupMap.put(name, group.getPrincipal());
          } catch (Exception e)
          {
              throw new SerializerException(
                      SerializerException.CREATE_OBJECT_FAILED
                              .create(new String[]
View Full Code Here

        while (list.hasNext())
        {

            try
            {
                Group group = (Group) list.next();
                JSGroup _tempGroup = (JSGroup) getObjectBehindPrinicpal(
                        groupMap, (BasePrincipal) (group.getPrincipal()));
                if (_tempGroup == null)
                {
                    _tempGroup = createJSGroup(group);
                    groupMap.put(_tempGroup.getName(), _tempGroup);
                    ((JSSeedData)getSnapshot()).getGroups().add(_tempGroup);
View Full Code Here

        if (null == groupPrincipal)
        {
            throw new SecurityException(SecurityException.GROUP_DOES_NOT_EXIST + " " + groupFullPathName);
        }
        Preferences preferences = Preferences.userRoot().node(fullPath);
        Group group = new GroupImpl(groupPrincipal, preferences);
        return group;
    }
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

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.