Package org.apache.pluto.om.common

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


                    portlet.getInitSecurityRoleRefSet();

                Iterator p = portletSecurityRoleRefs.iterator();

                while (p.hasNext()) {
                    SecurityRoleRef portletSecurityRoleRef =
                        (SecurityRoleRef) p.next();
                   
                    if portletSecurityRoleRef.getRoleLink()== null
                        &&   
                            webAppSecurityRoles.get(portletSecurityRoleRef.getRoleName())==null
                    ){
                        System.out.println(
                            "Note: The web application has no security role defined which matches the role name \""
                                + portletSecurityRoleRef.getRoleName()
                                + "\" of the security-role-ref element defined for the wrapper-servlet with the name '"
                                + portlet.getName()
                                + "'.");
                        break;           
                    }
                    SecurityRoleRef servletSecurityRoleRef =
                        servletSecurityRoleRefs.get(
                            portletSecurityRoleRef.getRoleName());
                    if (null != servletSecurityRoleRef) {
                        System.out.println(
                            "Note: Replaced already existing element of type <security-role-ref> with value \""
View Full Code Here


            if(securityIds != null)
            {
                for(int i=0; i<securityIds.length; i++)
                {
                    String id = securityIds[i];
                    SecurityRoleRef secRef = portlet.getInitSecurityRoleRefSet().get(id);
                    portlet.getInitSecurityRoleRefSet().remove(secRef);
                }
                /*
                Iterator securityIter = portlet.getInitSecurityRoleRefSet()..iterator();
                while (securityIter.hasNext())
View Full Code Here

            PortletDefinition portlet = (PortletDefinition) portletIterator.next();
            SecurityRoleRefSet securityRoleRefs = portlet.getInitSecurityRoleRefSet();
            Iterator roleRefsIterator = securityRoleRefs.iterator();
            while (roleRefsIterator.hasNext())
            {
                SecurityRoleRef roleRef = (SecurityRoleRef) roleRefsIterator.next();
                String roleName = roleRef.getRoleLink();
                if (roleName == null || roleName.length() == 0)
                {
                    roleName = roleRef.getRoleName();
                }
                if (roles.get(roleName) == null)
                {
                    String errorMsg = "Undefined security role " + roleName + " referenced from portlet "
                            + portlet.getName();
View Full Code Here

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

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

                .getSecurityRoles();

        Iterator roleRefIter = roleRefSet.iterator();
        while (roleRefIter.hasNext())
        {
            SecurityRoleRef roleRef = (SecurityRoleRef) roleRefIter.next();
            if (roleName.equals(roleRef.getRoleName()))
            {
                String roleLinkName = roleRef.getRoleLink();
                if (roleLinkName == null || roleLinkName.length() == 0)
                {
                    roleLinkName = roleName;
                }
                Iterator roleIter = roleSet.iterator();
View Full Code Here

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

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

                IGroupMember user = GroupService.getGroupMember(person.getEntityIdentifier());
                IGroupMember groupForRole = GroupService.getGroupMember(role, IEntityGroup.class);
                if (groupForRole != null) {
                    isUserInRole = user.isDeepMemberOf(groupForRole);
                    if (!isUserInRole) {
                        SecurityRoleRef securityRoleRef = securityRoleRefs.get(role);
                        if (securityRoleRef != null) {
                            String roleLink = securityRoleRef.getRoleLink();
                            IGroupMember groupForRoleLink = GroupService.getGroupMember(roleLink, IEntityGroup.class);
                            if (groupForRoleLink != null) {
                                isUserInRole = user.isDeepMemberOf(groupForRoleLink);
                            }
                        }
View Full Code Here

public class SecurityRoleRefSetImpl extends HashSet implements SecurityRoleRefSet, SecurityRoleRefSetCtrl, Serializable {

    // SecurityRoleRefSet methods
   
    public SecurityRoleRef get(String name) {
        SecurityRoleRef securityRoleRef = null;
        Iterator iterator = iterator();
        while (iterator.hasNext()) {
            SecurityRoleRef securityRoleRefCandidate = (SecurityRoleRef)iterator.next();
            if (securityRoleRefCandidate.getRoleName().equals(name)) {
                securityRoleRef = securityRoleRefCandidate;
            }
        }
        return securityRoleRef;
    }
View Full Code Here

TOP

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

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.