Package org.apache.jetspeed.om.security

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


    public void setGroupByName( String groupName )
    {
        try
        {
            Group temp = JetspeedSecurity.getGroup(groupName);
            if (null != temp)
            {
                group = temp;
            }
        }
View Full Code Here


            String name = locator.getName();
            String mediaType = locator.getMediaType();
            String language = locator.getLanguage();
            String country = locator.getCountry();
            Group group = locator.getGroup();
            Role role = locator.getRole();

            return nameEquals(name)
//                   && locator.getId() == id
                   && mediaTypeEquals(mediaType)
View Full Code Here

        String language = locator.getLanguage();
        String country = locator.getCountry();
        String pageName = locator.getName();
        String groupName = null;

        Group group = locator.getGroup();
        if (group != null) {
            groupName = group.getName();
        }

        if (groupName != null && groupName.length() > 0)
        {
            criteria.add(GROUP_NAME, groupName);
View Full Code Here

     */

    public void testGetGroups() throws Exception
    {
        GroupManagement service = getService();
        Group group = null;
        HashMap map = new HashMap();

        try
        {
            Iterator groups = service.getGroups();
            while (groups.hasNext())
            {
                group = (Group)groups.next();
                map.put(group.getName(), group);
            }
            assertTrue(map.get("apache") != null);
            assertTrue(map.get("Jetspeed") != null);
            assertTrue(map.get("bogusGroup") == null);
        }
View Full Code Here

     */

    public void testGetGroupsForUser() throws Exception
    {
        GroupManagement service = getService();
        Group group = null;
        HashMap map = new HashMap();

        try
        {
            Iterator groups = service.getGroups("turbine");
            while (groups.hasNext())
            {
                group = (Group)groups.next();
                map.put(group.getName(), group);
                System.out.println("[turbine] group = " + group.getName());
            }
            assertTrue(map.get("Jetspeed") != null);
            assertTrue(map.get("apache") == null);

            map.clear();
            groups = service.getGroups("admin");           
            while (groups.hasNext())
            {
                group = (Group)groups.next();
                map.put(group.getName(), group);
                System.out.println("[admin] group = " + group.getName());
            }
            assertTrue(map.get("Jetspeed") != null);

        }
        catch (Exception e)
View Full Code Here

     */

    public void testAddGroup() throws Exception
    {
        GroupManagement service = getService();
        Group group = null;

        try
        {
            group = JetspeedGroupFactory.getInstance();
            group.setName("bogus");
            service.addGroup(group);
            System.out.println("new group id = " + group.getId());
            assertTrue(group.getId() != null);
        }
        catch(Exception e)
        {
            fail(StringUtils.stackTrace(e));
        }
        try
        {
            group = JetspeedGroupFactory.getInstance();
            group.setName("bogus");
            service.addGroup(group);
            fail("Should've thrown a dup key exception on group");
        }
        catch(Exception e)
        {
View Full Code Here

     */

    public void testRemoveGroup() throws Exception
    {
        GroupManagement service = getService();
        Group group = null;

        try
        {
            service.removeGroup("bogus");
        }
View Full Code Here

    {
        GroupManagement service = getService();

        try
        {
            Group group = service.getGroup("Jetspeed");
            System.out.println("*** group nm = " + group.getName());
            System.out.println("*** group id = " + group.getId());
            assertTrue(group.getName().equals("Jetspeed"));
        }
        catch (Exception e)
        {
            fail(StringUtils.stackTrace(e));
        }
View Full Code Here

    {
        GroupManagement service = getService();

        try
        {
            Group group = service.getGroup("apache");
            service.saveGroup(group);
        }
        catch(Exception e)
        {
            fail(StringUtils.stackTrace(e));
View Full Code Here

     * @throws Exception
     */
    public void testJoinGroup() throws Exception
    {
        GroupManagement service = getService();
        Group group = null;

        try
        {
            service.joinGroup("turbine", "apache");
        }
View Full Code Here

TOP

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