Interface MultipartFileBuilder

  • All Known Implementing Classes:
    MultipartFileBuilderImpl

    @Validated
    public interface MultipartFileBuilder
    The multipart file builder interface.
    Author:
    Christian Bremer
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      reactor.core.publisher.Mono<org.springframework.web.multipart.MultipartFile> build​(@NotNull 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<org.springframework.web.multipart.MultipartFile> build​(org.springframework.http.codec.multipart.Part part)
      Build multipart file from the given part.
      reactor.core.publisher.Mono<List<org.springframework.web.multipart.MultipartFile>> buildList​(@NotNull 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​(@NotNull 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​(@NotNull 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.
      reactor.core.publisher.Mono<Map<String,​org.springframework.web.multipart.MultipartFile>> buildMap​(@NotNull 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.
      reactor.core.publisher.Mono<Map<String,​org.springframework.web.multipart.MultipartFile>> buildMap​(@NotNull 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​(@NotNull 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​(@NotNull reactor.core.publisher.Flux<? extends org.springframework.http.codec.multipart.Part>... parts)
      Build multi value map mono.
      static @NotNull org.springframework.web.multipart.MultipartFile getFirstMultipartFile​(org.springframework.util.MultiValueMap<String,​org.springframework.web.multipart.MultipartFile> map, String name)
      Get first multipart file.
      static @NotNull org.springframework.web.multipart.MultipartFile getMultipartFile​(List<org.springframework.web.multipart.MultipartFile> list, int index)
      Get multipart file with the specified index.
      static @NotNull 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.
      static @NotNull 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 Detail

      • 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 be null)
        Returns:
        the multipart file
      • build

        reactor.core.publisher.Mono<org.springframework.web.multipart.MultipartFile> build​(@NotNull
                                                                                           @NotNull 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​(@NotNull
                                                                                                     @NotNull 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​(@NotNull
                                                                                                     @NotNull 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 data
        requestParameters - the request parameters
        Returns:
        the list of multipart files
      • buildLists

        reactor.core.publisher.Flux<List<org.springframework.web.multipart.MultipartFile>> buildLists​(@NotNull
                                                                                                      @NotNull 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 data
        requestParameters - 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​(@NotNull
                                                                                                                @NotNull 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​(@NotNull
                                                                                                                @NotNull 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 data
        requestParameters - 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​(@NotNull
                                                                                                                                                             @NotNull 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​(@NotNull
                                                                                                                                                             @NotNull 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 data
        requestParameters - the request parameters
        Returns:
        the multi value map of multipart files
      • getMultipartFile

        @NotNull
        static @NotNull 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 list
        index - the index
        Returns:
        the multipart file
      • getMultipartFile

        @NotNull
        static @NotNull 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 map
        name - the request parameter name
        Returns:
        the multipart file
      • getMultipartFiles

        @NotNull
        static @NotNull 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 map
        name - the name
        Returns:
        the multipart files
      • getFirstMultipartFile

        @NotNull
        static @NotNull 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 map
        name - the name
        Returns:
        the first multipart file