Interface MultipartFileBuilder
- All Known Implementing Classes:
MultipartFileBuilderImpl
public interface MultipartFileBuilder
The multipart file builder interface.
- Author:
- Christian Bremer
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<org.springframework.web.multipart.MultipartFile> build(org.springframework.http.codec.multipart.Part part) Build multipart file from the given part.reactor.core.publisher.Mono<org.springframework.web.multipart.MultipartFile> build(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part> parts) Build multipart file from the last part of the given parts.reactor.core.publisher.Mono<List<org.springframework.web.multipart.MultipartFile>> buildList(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build list of multipart files from the given multi part data.reactor.core.publisher.Mono<List<org.springframework.web.multipart.MultipartFile>> buildList(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part> parts) Build multipart files from the given parts.reactor.core.publisher.Flux<List<org.springframework.web.multipart.MultipartFile>> buildLists(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build list (flux) of lists of multipart files from the given multi part data.buildMap(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build map of multipart files from the given multi part data.buildMap(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part>... parts) Build map mono.reactor.core.publisher.Mono<org.springframework.util.MultiValueMap<String, org.springframework.web.multipart.MultipartFile>> buildMultiValueMap(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build multi value map of multipart files from the given multi part data.reactor.core.publisher.Mono<org.springframework.util.MultiValueMap<String, org.springframework.web.multipart.MultipartFile>> buildMultiValueMap(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part>... parts) Build multi value map mono.static org.springframework.web.multipart.MultipartFilegetFirstMultipartFile(org.springframework.util.MultiValueMap<String, org.springframework.web.multipart.MultipartFile> map, String name) Get first multipart file.static org.springframework.web.multipart.MultipartFilegetMultipartFile(List<org.springframework.web.multipart.MultipartFile> list, int index) Get multipart file with the specified index.static org.springframework.web.multipart.MultipartFilegetMultipartFile(Map<String, org.springframework.web.multipart.MultipartFile> map, String name) Get multipart file with the specified request parameter name.static List<org.springframework.web.multipart.MultipartFile> getMultipartFiles(org.springframework.util.MultiValueMap<String, org.springframework.web.multipart.MultipartFile> map, String name) Get multipart files with the specified request parameter.
-
Method Details
-
build
reactor.core.publisher.Mono<org.springframework.web.multipart.MultipartFile> build(org.springframework.http.codec.multipart.Part part) Build multipart file from the given part.If hhe given part is
null, an empty multipart file will be returned.- Parameters:
part- the part (can benull)- Returns:
- the multipart file
-
build
reactor.core.publisher.Mono<org.springframework.web.multipart.MultipartFile> build(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part> parts) Build multipart file from the last part of the given parts.- Parameters:
parts- the parts- Returns:
- the multipart file
-
buildList
reactor.core.publisher.Mono<List<org.springframework.web.multipart.MultipartFile>> buildList(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part> parts) Build multipart files from the given parts.- Parameters:
parts- the parts- Returns:
- the multipart files
-
buildList
reactor.core.publisher.Mono<List<org.springframework.web.multipart.MultipartFile>> buildList(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build list of multipart files from the given multi part data.- Parameters:
multiPartData- the multi part datarequestParameters- the request parameters- Returns:
- the list of multipart files
-
buildLists
reactor.core.publisher.Flux<List<org.springframework.web.multipart.MultipartFile>> buildLists(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build list (flux) of lists of multipart files from the given multi part data.- Parameters:
multiPartData- the multi part datarequestParameters- the request parameters- Returns:
- the list (flux) of lists of multipart files
-
buildMap
reactor.core.publisher.Mono<Map<String,org.springframework.web.multipart.MultipartFile>> buildMap(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part>... parts) Build map mono.- Parameters:
parts- the parts- Returns:
- the mono
-
buildMap
reactor.core.publisher.Mono<Map<String,org.springframework.web.multipart.MultipartFile>> buildMap(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build map of multipart files from the given multi part data.- Parameters:
multiPartData- the multi part datarequestParameters- the request parameters- Returns:
- the map of multipart files
-
buildMultiValueMap
reactor.core.publisher.Mono<org.springframework.util.MultiValueMap<String,org.springframework.web.multipart.MultipartFile>> buildMultiValueMap(reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part>... parts) Build multi value map mono.- Parameters:
parts- the parts- Returns:
- the mono
-
buildMultiValueMap
reactor.core.publisher.Mono<org.springframework.util.MultiValueMap<String,org.springframework.web.multipart.MultipartFile>> buildMultiValueMap(org.springframework.util.MultiValueMap<String, org.springframework.http.codec.multipart.Part> multiPartData, String... requestParameters) Build multi value map of multipart files from the given multi part data.- Parameters:
multiPartData- the multi part datarequestParameters- the request parameters- Returns:
- the multi value map of multipart files
-
getMultipartFile
static org.springframework.web.multipart.MultipartFile getMultipartFile(List<org.springframework.web.multipart.MultipartFile> list, int index) Get multipart file with the specified index. If the list is smaller than the index, an empty multipart file will be returned.- Parameters:
list- the listindex- the index- Returns:
- the multipart file
-
getMultipartFile
static org.springframework.web.multipart.MultipartFile getMultipartFile(Map<String, org.springframework.web.multipart.MultipartFile> map, String name) Get multipart file with the specified request parameter name. If no such multipart file exists, an empty one will be returned.- Parameters:
map- the mapname- the request parameter name- Returns:
- the multipart file
-
getMultipartFiles
static List<org.springframework.web.multipart.MultipartFile> getMultipartFiles(org.springframework.util.MultiValueMap<String, org.springframework.web.multipart.MultipartFile> map, String name) Get multipart files with the specified request parameter. If no such list of multipart files exists, an empty list will be returned.- Parameters:
map- the mapname- the name- Returns:
- the multipart files
-
getFirstMultipartFile
static org.springframework.web.multipart.MultipartFile getFirstMultipartFile(org.springframework.util.MultiValueMap<String, org.springframework.web.multipart.MultipartFile> map, String name) Get first multipart file. If no such multipart file exists, an empty one will be returned.- Parameters:
map- the mapname- the name- Returns:
- the first multipart file
-