Package org.apache.pluto.om.common

Examples of org.apache.pluto.om.common.SecurityRole


            if ( autoCreateRoles && roleManager != null && pa.getWebApplicationDefinition().getSecurityRoles() != null )
            {
                try
                {
                    Iterator rolesIter = pa.getWebApplicationDefinition().getSecurityRoles().iterator();
                    SecurityRole sr;
                    while ( rolesIter.hasNext() )
                    {
                        sr = (SecurityRole)rolesIter.next();
                        if ( !roleManager.roleExists(sr.getRoleName()) )
                        {
                            roleManager.addRole(sr.getRoleName());
                            log.info("AutoCreated role: "+sr.getRoleName()+" from portlet application "+paName+" its web definition");
                        }
                    }
                }
                catch (SecurityException sex)
                {
View Full Code Here


    public SecurityRole remove(String roleName)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext())
        {
            SecurityRole securityRole = (SecurityRole)iterator.next();
            if (securityRole.getRoleName().equals(roleName))
            {
                super.remove(securityRole);
                return securityRole;
            }
        }
View Full Code Here

    public SecurityRole get(String roleName)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            SecurityRole securityRole = (SecurityRole)iterator.next();
            if (securityRole.getRoleName().equals(roleName)) {
                return securityRole;
            }
        }
        return null;
    }
View Full Code Here

                    roleLinkName = roleName;
                }
                Iterator roleIter = roleSet.iterator();
                while (roleIter.hasNext())
                {
                    SecurityRole role = (SecurityRole) roleIter.next();
                    if (roleLinkName.equals(role.getRoleName()))
                        return role.getRoleName();
                }
            }
        }
        return roleName;       
    }
View Full Code Here

    public SecurityRole get(String roleName)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            SecurityRole securityRole = (SecurityRole)iterator.next();
            if (securityRole.getRoleName().equals(roleName)) {
                return securityRole;
            }
        }
        return null;
    }
View Full Code Here

    public SecurityRole remove(String roleName)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext())
        {
            SecurityRole securityRole = (SecurityRole)iterator.next();
            if (securityRole.getRoleName().equals(roleName))
            {
                super.remove(securityRole);
                return securityRole;
            }
        }
View Full Code Here

public class SecurityRoleSetImpl extends HashSet implements SecurityRoleSet, Serializable {

    // SecurityRoleSet methods
   
    public SecurityRole get(String name) {
        SecurityRole securityRole = null;
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            SecurityRole securityRoleCandidate = (SecurityRole)iterator.next();
            if (securityRoleCandidate.getRoleName().equals(name)) {
                securityRole = securityRoleCandidate;
            }
        }
        return securityRole;
    }
View Full Code Here

       
        // <security-role>
        SecurityRoleSet securityRoles = webAppImpl.getSecurityRoles();
        if (securityRoles != null) {
            for (Iterator iter = securityRoles.iterator(); iter.hasNext();) {
                SecurityRole securityRole = (SecurityRole)iter.next();
                Element securityRoleE = doc.createElement("security-role");
                addTextElement(securityRoleE, "description", securityRole.getDescription());
                addTextElement(securityRoleE, "role-name", securityRole.getRoleName());
                webAppE.appendChild(securityRoleE);
            }
        }
       
        // <env-entry>
View Full Code Here

    private void checkWebSecurityRoles( MutableWebApplication webApp )
    {
        SecurityRoleSet roles = webApp.getSecurityRoles();
        assertEquals("Invalid number of security role definitions found", 1, roles.size());
        SecurityRole role = roles.get("users.admin");
        assertNotNull("Role users.admin undefined", role);
    }
View Full Code Here

            if ( autoCreateRoles && roleManager != null && pa.getWebApplicationDefinition().getSecurityRoles() != null )
            {
                try
                {
                    Iterator rolesIter = pa.getWebApplicationDefinition().getSecurityRoles().iterator();
                    SecurityRole sr;
                    while ( rolesIter.hasNext() )
                    {
                        sr = (SecurityRole)rolesIter.next();
                        if ( !roleManager.roleExists(sr.getRoleName()) )
                        {
                            roleManager.addRole(sr.getRoleName());
                            log.info("AutoCreated role: "+sr.getRoleName()+" from portlet application "+paName+" its web definition");
                        }
                    }
                }
                catch (SecurityException sex)
                {
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.common.SecurityRole

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.