multipartConfig.setFileSizeThreshold(multipartConfigMetaData.getFileSizeThreshold());
wrapper.setMultipartConfig(multipartConfig);
}
// Merge @ServletSecurity
if (annotation.getServletSecurity() != null && wrapper.getServletSecurity() == null) {
ServletSecurityMetaData servletSecurityAnnotation = annotation.getServletSecurity();
Collection<HttpMethodConstraintElement> methodConstraints = null;
EmptyRoleSemantic emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
if (servletSecurityAnnotation.getEmptyRoleSemantic() != null) {
emptyRoleSemantic = EmptyRoleSemantic.valueOf(servletSecurityAnnotation.getEmptyRoleSemantic()
.toString());
}
TransportGuarantee transportGuarantee = TransportGuarantee.NONE;
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());