Java Code Examples for org.springframework.util.MultiValueMap#values()
The following examples show how to use
org.springframework.util.MultiValueMap#values() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonsFileUploadSupport.java From spring-analysis-note with MIT License | 5 votes |
/** * Cleanup the Spring MultipartFiles created during multipart parsing, * potentially holding temporary data on disk. * <p>Deletes the underlying Commons FileItem instances. * @param multipartFiles a Collection of MultipartFile instances * @see org.apache.commons.fileupload.FileItem#delete() */ protected void cleanupFileItems(MultiValueMap<String, MultipartFile> multipartFiles) { for (List<MultipartFile> files : multipartFiles.values()) { for (MultipartFile file : files) { if (file instanceof CommonsMultipartFile) { CommonsMultipartFile cmf = (CommonsMultipartFile) file; cmf.getFileItem().delete(); LogFormatUtils.traceDebug(logger, traceOn -> "Cleaning up part '" + cmf.getName() + "', filename '" + cmf.getOriginalFilename() + "'" + (traceOn ? ", stored " + cmf.getStorageDescription() : "")); } } } }
Example 2
Source File: CommonsFileUploadSupport.java From java-technology-stack with MIT License | 5 votes |
/** * Cleanup the Spring MultipartFiles created during multipart parsing, * potentially holding temporary data on disk. * <p>Deletes the underlying Commons FileItem instances. * @param multipartFiles a Collection of MultipartFile instances * @see org.apache.commons.fileupload.FileItem#delete() */ protected void cleanupFileItems(MultiValueMap<String, MultipartFile> multipartFiles) { for (List<MultipartFile> files : multipartFiles.values()) { for (MultipartFile file : files) { if (file instanceof CommonsMultipartFile) { CommonsMultipartFile cmf = (CommonsMultipartFile) file; cmf.getFileItem().delete(); LogFormatUtils.traceDebug(logger, traceOn -> "Cleaning up part '" + cmf.getName() + "', filename '" + cmf.getOriginalFilename() + "'" + (traceOn ? ", stored " + cmf.getStorageDescription() : "")); } } } }
Example 3
Source File: CommonsFileUploadSupport.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Cleanup the Spring MultipartFiles created during multipart parsing, * potentially holding temporary data on disk. * <p>Deletes the underlying Commons FileItem instances. * @param multipartFiles Collection of MultipartFile instances * @see org.apache.commons.fileupload.FileItem#delete() */ protected void cleanupFileItems(MultiValueMap<String, MultipartFile> multipartFiles) { for (List<MultipartFile> files : multipartFiles.values()) { for (MultipartFile file : files) { if (file instanceof CommonsMultipartFile) { CommonsMultipartFile cmf = (CommonsMultipartFile) file; cmf.getFileItem().delete(); if (logger.isDebugEnabled()) { logger.debug("Cleaning up multipart file [" + cmf.getName() + "] with original filename [" + cmf.getOriginalFilename() + "], stored " + cmf.getStorageDescription()); } } } } }
Example 4
Source File: CommonsFileUploadSupport.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Cleanup the Spring MultipartFiles created during multipart parsing, * potentially holding temporary data on disk. * <p>Deletes the underlying Commons FileItem instances. * @param multipartFiles Collection of MultipartFile instances * @see org.apache.commons.fileupload.FileItem#delete() */ protected void cleanupFileItems(MultiValueMap<String, MultipartFile> multipartFiles) { for (List<MultipartFile> files : multipartFiles.values()) { for (MultipartFile file : files) { if (file instanceof CommonsMultipartFile) { CommonsMultipartFile cmf = (CommonsMultipartFile) file; cmf.getFileItem().delete(); if (logger.isDebugEnabled()) { logger.debug("Cleaning up multipart file [" + cmf.getName() + "] with original filename [" + cmf.getOriginalFilename() + "], stored " + cmf.getStorageDescription()); } } } } }
Example 5
Source File: SpringSocialUserDetailService.java From AIDR with GNU Affero General Public License v3.0 | 5 votes |
private List<Connection<?>> getConnections(ConnectionRepository connectionRepository) { MultiValueMap<String, Connection<?>> connections = connectionRepository.findAllConnections(); List<Connection<?>> allConnections = new ArrayList<Connection<?>>(); if (connections.size() > 0) { for (List<Connection<?>> connectionList : connections.values()) { for (Connection<?> connection : connectionList) { allConnections.add(connection); } } } return allConnections; }
Example 6
Source File: SpringSocialUserDetailService.java From AIDR with GNU Affero General Public License v3.0 | 5 votes |
private List<Connection<?>> getConnections(ConnectionRepository connectionRepository) { MultiValueMap<String, Connection<?>> connections = connectionRepository.findAllConnections(); List<Connection<?>> allConnections = new ArrayList<Connection<?>>(); if (connections.size() > 0) { for (List<Connection<?>> connectionList : connections.values()) { for (Connection<?> connection : connectionList) { allConnections.add(connection); } } } return allConnections; }