Package org.apache.jetspeed.security

Examples of org.apache.jetspeed.security.Group


         User user = userManager.getUser(username);
        if (user == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.USER, username));
        }
        Group group = getGroup(groupName);
        if (group == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
        super.addAssociation(user, group, JetspeedPrincipalAssociationType.IS_MEMBER_OF);
View Full Code Here


        User user = userManager.getUser(username);
        if (user == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.USER, username));
        }
        Group group = getGroup(groupName);
        if (group == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
        super.removeAssociation(user, group, JetspeedPrincipalAssociationType.IS_MEMBER_OF);
View Full Code Here

        Collection<SSOUser> users = ssoManager.getRemoteUsers(testSite, testuser);
        assertEquals(0, users.size());

       
        User subjectUser = ums.addUser("userForSubjectTest");
        Group subjectGroup = gms.addGroup("groupForSubjectTest");
       
        ssoManager.addUser(testSite, subjectUser, "userForTestuserPrincipal", "x");
        ssoManager.addUser(testSite, subjectGroup, "userForTestgroupPrincipal", "x");
       
        Subject s = new Subject();
View Full Code Here

     *      java.lang.String)
     */
    public void addRoleToGroup(String roleName, String groupName) throws SecurityException
    {
        checkInitialized();
      Group group = groupManager.getGroup(groupName);
        if (group == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
        Role role = getRole(roleName);
View Full Code Here

     *      java.lang.String)
     */
    public void removeRoleFromGroup(String roleName, String groupName) throws SecurityException
    {
      checkInitialized();
      Group group = groupManager.getGroup(groupName);
        if (group == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
        Role role = getRole(roleName);
View Full Code Here

           
            try
            {
                if (!(groupManager.groupExists(name)))
                    groupManager.addGroup(name);
                Group group = groupManager.getGroup(name);
                refs.getPrincipalMap(JetspeedPrincipalType.GROUP).put(name, group);
            }
            catch (Exception e)
            {
                throw new SerializerException(SerializerException.CREATE_OBJECT_FAILED.create(new String[] { "Group",
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

         User user = userManager.getUser(username);
        if (user == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.USER, username));
        }
        Group group = getGroup(groupName);
        if (group == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
        super.addAssociation(user, group, JetspeedPrincipalAssociationType.IS_MEMBER_OF);
View Full Code Here

        User user = userManager.getUser(username);
        if (user == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.USER, username));
        }
        Group group = getGroup(groupName);
        if (group == null)
        {
            throw new SecurityException(SecurityException.PRINCIPAL_DOES_NOT_EXIST.createScoped(JetspeedPrincipalType.GROUP, groupName));
        }
        super.removeAssociation(user, group, JetspeedPrincipalAssociationType.IS_MEMBER_OF);
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.