use of org.apache.felix.http.base.internal.dispatch.MultipartConfig in project felix by apache.
the class ServletDTOBuilder method build.
/**
* Build a servlet DTO from a servlet info
* @param info The servlet info
* @return A servlet DTO
*/
public static ServletDTO build(final ServletInfo info, final int reason) {
final ServletDTO dto = (reason != -1 ? new FailedServletDTO() : new ServletDTO());
BaseServletDTOBuilder.fill(dto, info);
if (reason != -1) {
((FailedServletDTO) dto).failureReason = reason;
}
dto.patterns = BuilderConstants.EMPTY_STRING_ARRAY;
final MultipartConfig config = info.getMultipartConfig();
dto.multipartEnabled = config != null;
if (config != null) {
dto.multipartFileSizeThreshold = config.multipartThreshold;
dto.multipartLocation = config.multipartLocation;
dto.multipartMaxFileSize = config.multipartMaxFileSize;
dto.multipartMaxRequestSize = config.multipartMaxRequestSize;
}
return dto;
}
Aggregations