Package org.apache.jetspeed.om.portlet

Examples of org.apache.jetspeed.om.portlet.SecurityRoleRef


    @Override
    protected SecurityRoleRef load()
    {
        PortletApplication app = locator.getPortletRegistry().getPortletApplication(paNodeBean.getApplicationName());
        PortletDefinition def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
        SecurityRoleRef securityRoleRef = def.getSecurityRoleRef(roleName);
        return securityRoleRef;
    }
View Full Code Here


    public boolean equals(Object obj)
    {
        if (obj != null && obj instanceof SecurityRoleRef)
        {
            SecurityRoleRef aRef = (SecurityRoleRef) obj;
            //TODO: Because of a bug in OJB 1.0.rc4 fields seems not have been set
            //      before this object is put into a HashMap.
            //      Therefore, for the time being, check against null values is
            //      required.
            //      Once 1.0rc5 or higher can be used the following line should be
            //      used again.
            //return this.getRoleName().equals(aRef.getRoleName());
            return getRoleName() != null && getRoleName().equals(aRef.getRoleName());
        }

        return false;
    }
View Full Code Here

            copy.addSupportedPublishingEvent(eventDefRef.getQName());
        }
       
        for (SecurityRoleRef secRoleRef : source.getSecurityRoleRefs())
        {
            SecurityRoleRef copySecRoleRef = copy.addSecurityRoleRef(secRoleRef.getRoleName());
            copySecRoleRef.setRoleLink(secRoleRef.getRoleLink());
           
            for (Description desc : secRoleRef.getDescriptions())
            {
                Description copyDesc = copySecRoleRef.addDescription(desc.getLang());
                copyDesc.setDescription(desc.getDescription());
            }
        }
       
        for (Supports supports : source.getSupports())
View Full Code Here

                jdesc.setDescription(desc.getDescription());
            }                                       
        }
        for (org.apache.pluto.container.om.portlet.SecurityRoleRef srr : pd.getSecurityRoleRefs())
        {
            SecurityRoleRef jsrr = jpd.addSecurityRoleRef(srr.getRoleName());
            jsrr.setRoleLink(srr.getRoleLink());
        }
       
        // First load the required default PortletInfo Language using the English Locale
        Language defaultLanguage = addLanguage(jpd, pd.getPortletInfo(), JetspeedLocale.getDefaultLocale(), false);
        for (String localeString : pd.getSupportedLocales())
View Full Code Here

    private void checkPortletSecurityRoleRefs( PortletDefinition portlet )
    {
        List<SecurityRoleRef> roleRefs = portlet.getSecurityRoleRefs();
        assertEquals("Invalid number of security role references found", 2, roleRefs.size());
       
        SecurityRoleRef roleRef = portlet.getSecurityRoleRef("admin");
        assertNotNull("Security Role Ref admin undefined", roleRef);
        assertEquals("security Role link expected", "users.admin", roleRef.getRoleLink());
       
        roleRef = portlet.getSecurityRoleRef("users.manager");
        assertNotNull("Security Role Ref users.manager undefined", roleRef);
        assertNull("Undefined security Role link for users.managers expected", roleRef.getRoleLink());
    }
View Full Code Here

            copy.addSupportedPublishingEvent(eventDefRef.getQName());
        }

        for (SecurityRoleRef secRoleRef : source.getSecurityRoleRefs())
        {
            SecurityRoleRef copySecRoleRef = copy.addSecurityRoleRef(secRoleRef.getRoleName());
            copySecRoleRef.setRoleLink(secRoleRef.getRoleLink());

            for (Description desc : secRoleRef.getDescriptions())
            {
                Description copyDesc = copySecRoleRef.addDescription(desc.getLang());
                copyDesc.setDescription(desc.getDescription());
            }
        }

        for (Supports supports : source.getSupports())
View Full Code Here

    public boolean equals(Object obj)
    {
        if (obj != null && obj instanceof SecurityRoleRef)
        {
            SecurityRoleRef aRef = (SecurityRoleRef) obj;
            //TODO: Because of a bug in OJB 1.0.rc4 fields seems not have been set
            //      before this object is put into a HashMap.
            //      Therefore, for the time being, check against null values is
            //      required.
            //      Once 1.0rc5 or higher can be used the following line should be
            //      used again.
            //return this.getRoleName().equals(aRef.getRoleName());
            return getRoleName() != null && getRoleName().equals(aRef.getRoleName());
        }

        return false;
    }
View Full Code Here

                jdesc.setDescription(desc.getDescription());
            }                                       
        }
        for (org.apache.pluto.container.om.portlet.SecurityRoleRef srr : pd.getSecurityRoleRefs())
        {
            SecurityRoleRef jsrr = jpd.addSecurityRoleRef(srr.getRoleName());
            jsrr.setRoleLink(srr.getRoleLink());
        }
       
        // First load the required default PortletInfo Language using the English Locale
        Language defaultLanguage = addLanguage(jpd, pd.getPortletInfo(), JetspeedLocale.getDefaultLocale(), false);
        for (String localeString : pd.getSupportedLocales())
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.portlet.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.