Package org.apache.pluto.om.common

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


    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

    // SecurityRoleSet implementation.

    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;
            }
        }
        return null;
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

    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

    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

     */
    public SecurityRole get(String name) {
        for(Iterator iter = roles.iterator(); iter.hasNext();){
            Object o = iter.next();
            if(o instanceof SecurityRole){
                SecurityRole role= (SecurityRole)o;
                if(role.getRoleName().equals(name)){
                    return role;
                }
            }
        }
        return null;
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.