if (servletSecurityAnnotation.getTransportGuarantee() != null) {
transportGuarantee = TransportGuarantee.valueOf(servletSecurityAnnotation
.getTransportGuarantee().toString());
}
String[] roleNames = servletSecurityAnnotation.getRolesAllowed().toArray(new String[0]);
HttpConstraintElement constraint = new HttpConstraintElement(emptyRoleSemantic, transportGuarantee,
roleNames);
if (servletSecurityAnnotation.getHttpMethodConstraints() != null) {
methodConstraints = new HashSet<HttpMethodConstraintElement>();
for (HttpMethodConstraintMetaData annotationMethodConstraint : servletSecurityAnnotation
.getHttpMethodConstraints()) {
emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
if (annotationMethodConstraint.getEmptyRoleSemantic() != null) {
emptyRoleSemantic = EmptyRoleSemantic.valueOf(annotationMethodConstraint
.getEmptyRoleSemantic().toString());
}
transportGuarantee = TransportGuarantee.NONE;
if (annotationMethodConstraint.getTransportGuarantee() != null) {
transportGuarantee = TransportGuarantee.valueOf(annotationMethodConstraint
.getTransportGuarantee().toString());
}
roleNames = annotationMethodConstraint.getRolesAllowed().toArray(new String[0]);
HttpConstraintElement constraint2 = new HttpConstraintElement(emptyRoleSemantic,
transportGuarantee, roleNames);
HttpMethodConstraintElement methodConstraint = new HttpMethodConstraintElement(
annotationMethodConstraint.getMethod(), constraint2);
methodConstraints.add(methodConstraint);
}