annotationMD.setMultipartConfig(multipartConfig);
}
public MultipartConfigMetaData create(Class<?> element)
{
MultipartConfig multipartConfig = finder.getAnnotation(element, MultipartConfig.class);
if(multipartConfig == null)
return null;
MultipartConfigMetaData metaData = new MultipartConfigMetaData();
if (!"".equals(multipartConfig.location()))
metaData.setLocation(multipartConfig.location());
if (multipartConfig.maxFileSize() != -1L)
metaData.setMaxFileSize(multipartConfig.maxFileSize());
if (multipartConfig.maxRequestSize() != -1L)
metaData.setMaxRequestSize(multipartConfig.maxRequestSize());
if (multipartConfig.fileSizeThreshold() != 0)
metaData.setFileSizeThreshold(multipartConfig.fileSizeThreshold());
return metaData;
}