private void processServletSecurityElement(List<SecurityConstraintInfo> securityConstraints, ServletSecurityElement servletSecurityElement, Collection<String> urlPatterns) {
if (servletSecurityElement.getHttpMethodConstraints().size() > 0) {
for (HttpMethodConstraintElement httpMethodConstraint : servletSecurityElement.getHttpMethodConstraints()) {
//Generate a security-constraint for each HttpMethodConstraint
SecurityConstraintInfo securityConstraint = newHTTPMethodSecurityConstraint(httpMethodConstraint.getRolesAllowed(), httpMethodConstraint.getTransportGuarantee(),
httpMethodConstraint.getEmptyRoleSemantic(), httpMethodConstraint.getMethodName(), urlPatterns);
if (securityConstraint != null) {
securityConstraints.add(securityConstraint);
}
declareRoles(httpMethodConstraint.getRolesAllowed());
}
}
SecurityConstraintInfo securityConstraint = newHTTPSecurityConstraint(servletSecurityElement.getRolesAllowed(), servletSecurityElement.getTransportGuarantee(),
servletSecurityElement.getEmptyRoleSemantic(), servletSecurityElement.getMethodNames(), urlPatterns);
if (securityConstraint != null) {
securityConstraints.add(securityConstraint);
}
declareRoles(servletSecurityElement.getRolesAllowed());