Package org.apache.pluto.descriptors.common

Examples of org.apache.pluto.descriptors.common.SecurityRoleRefDD


     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here


     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

        //Load the group information about the current user
        final EntityIdentifier personEntityId = this.person.getEntityIdentifier();
        final IGroupMember personGroupMember = GroupService.getGroupMember(personEntityId);

        //Find the role link for the role
        final SecurityRoleRefDD securityRoleRef = getSecurityRoleRef(role);
        if (securityRoleRef == null) {
            return false;
        }
       
        //Find the group specified by the role link
        final String roleLink = securityRoleRef.getRoleLink();
        final IGroupMember groupForRoleLink = GroupService.getGroupMember(roleLink, IEntityGroup.class);
        if (groupForRoleLink == null) {
            return false;
        }
       
View Full Code Here

     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

                                        PortletDD portlet) {

        HashMap sRefs = new HashMap();
        List sSecRoleRefs = servlet.getSecurityRoleRefs();
        Iterator i = sSecRoleRefs.iterator();
        SecurityRoleRefDD srr;
        while(i.hasNext()) {
            srr = (SecurityRoleRefDD)i.next();
            sRefs.put(srr.getRoleName(), srr);
        }

        HashMap wRoles = new HashMap();
        i = webApp.getSecurityRoles().iterator();
        SecurityRoleDD sr;
        while(i.hasNext()) {
            sr = (SecurityRoleDD)i.next();
            wRoles.put(sr.getRoleName(), sr);
        }

        Collection pRoles = portlet.getSecurityRoleRefs();
        Iterator p = pRoles.iterator();
        SecurityRoleRefDD pRole;
        while(p.hasNext()) {
            pRole = (SecurityRoleRefDD) p.next();
            if (pRole.getRoleLink()==null
                && wRoles.get(pRole.getRoleName())==null) {
                    System.out.println(
                        "Note: The web application has no security role defined which matches the role name \""
                        + pRole.getRoleName()
                        + "\" of the security-role-ref element defined for the wrapper-servlet with the name '"
                        + portlet.getPortletName()
                        + "'.");
                    break;
            }
            SecurityRoleRefDD sRR = (SecurityRoleRefDD)
                sRefs.get(pRole.getRoleName());

            if (null != sRR) {
                System.out.println("Note: Replaced already existing element of type <security-role-ref> with value \""
                        + pRole.getRoleName()
                        + "\" for subelement of type <role-name> for the wrapper-servlet with the name '"
                        + portlet.getPortletName()
                        + "'.");
                    sSecRoleRefs.remove(sRR);
            }
            SecurityRoleRefDD dd = new SecurityRoleRefDD();
            dd.setDescription(pRole.getDescription());
            dd.setRoleLink(pRole.getRoleLink());
            dd.setRoleName(pRole.getRoleName());
            sSecRoleRefs.add(dd);
        }
    }
View Full Code Here

     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

     */
    public boolean isUserInRole(String roleName) {
        PortletEntity entity = internalPortletWindow.getPortletEntity();
        PortletDD def = entity.getPortletDefinition();

        SecurityRoleRefDD ref = null;
        Iterator refs = def.getSecurityRoleRefs().iterator();
        while (refs.hasNext()) {
            SecurityRoleRefDD r = (SecurityRoleRefDD) refs.next();
            if (r.getRoleName().equals(roleName)) {
                ref = r;
                break;
            }
        }

View Full Code Here

TOP

Related Classes of org.apache.pluto.descriptors.common.SecurityRoleRefDD

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.