}
SecurityRoleRefSet servletSecurityRoleRefs =
((ServletDefinitionImpl)servlet).getInitSecurityRoleRefSet();
SecurityRoleRefSetCtrl servletSecurityRoleRefSetCtrl =
(SecurityRoleRefSetCtrl) controllerFactory.get(
servletSecurityRoleRefs);
SecurityRoleSet webAppSecurityRoles = webApp.getSecurityRoles();
SecurityRoleRefSet portletSecurityRoleRefs =
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 \""
+ portletSecurityRoleRef.getRoleName()
+ "\" for subelement of type <role-name> for the wrapper-servlet with the name '"
+ portlet.getName()
+ "'.");
servletSecurityRoleRefSetCtrl.remove(
servletSecurityRoleRef);
}
servletSecurityRoleRefSetCtrl.add(portletSecurityRoleRef);
}
}
TagDefinition portletTagLib = new TagDefinition();