Class MultipartDataInserter
- java.lang.Object
-
- org.bremersee.apiclient.webflux.contract.spring.AbstractRequestBodyInserter
-
- org.bremersee.apiclient.webflux.contract.spring.MultipartDataInserter
-
- All Implemented Interfaces:
BiFunction<Invocation,org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec,org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?>>
,RequestBodyInserter
public class MultipartDataInserter extends AbstractRequestBodyInserter
The multipart data inserter.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description MultipartDataInserter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?>
apply(Invocation invocation, org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec requestBodyUriSpec)
boolean
canInsert(Invocation invocation)
Can insert boolean.protected boolean
hasMappingAnnotation(InvocationParameter invocationParameter)
Has mapping annotation boolean.protected boolean
isMultipartFormData(Invocation invocation)
Is multipart form data.protected boolean
isPossibleBodyValue(InvocationParameter invocationParameter)
Is possible body value boolean.protected boolean
isRequestBody(InvocationParameter invocationParameter)
Is request body.protected boolean
isRequestPart(InvocationParameter invocationParameter)
Is request part.MultipartDataInserter
withContentTypeResolver(Function<Invocation,Optional<org.springframework.http.MediaType>> contentTypeResolver)
With content type resolver.MultipartDataInserter
withPartConverter(org.springframework.core.convert.converter.Converter<org.springframework.http.codec.multipart.Part,org.springframework.http.HttpEntity<?>> partConverter)
With part converter.-
Methods inherited from class org.bremersee.apiclient.webflux.contract.spring.AbstractRequestBodyInserter
canInsert, findPossibleBodies, isPossibleBody
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
withContentTypeResolver
public MultipartDataInserter withContentTypeResolver(Function<Invocation,Optional<org.springframework.http.MediaType>> contentTypeResolver)
With content type resolver.- Parameters:
contentTypeResolver
- the content type resolver- Returns:
- the multipart data inserter
-
withPartConverter
public MultipartDataInserter withPartConverter(org.springframework.core.convert.converter.Converter<org.springframework.http.codec.multipart.Part,org.springframework.http.HttpEntity<?>> partConverter)
With part converter.- Parameters:
partConverter
- the part converter- Returns:
- the multipart data inserter
-
canInsert
public boolean canInsert(Invocation invocation)
Description copied from interface:RequestBodyInserter
Can insert boolean.- Specified by:
canInsert
in interfaceRequestBodyInserter
- Overrides:
canInsert
in classAbstractRequestBodyInserter
- Parameters:
invocation
- the invocation- Returns:
- the boolean
-
isMultipartFormData
protected boolean isMultipartFormData(Invocation invocation)
Is multipart form data.- Parameters:
invocation
- the invocation- Returns:
- the boolean
-
hasMappingAnnotation
protected boolean hasMappingAnnotation(InvocationParameter invocationParameter)
Description copied from class:AbstractRequestBodyInserter
Has mapping annotation boolean.- Overrides:
hasMappingAnnotation
in classAbstractRequestBodyInserter
- Parameters:
invocationParameter
- the invocation parameter- Returns:
- the boolean
-
isPossibleBodyValue
protected boolean isPossibleBodyValue(InvocationParameter invocationParameter)
Description copied from class:AbstractRequestBodyInserter
Is possible body value boolean.- Specified by:
isPossibleBodyValue
in classAbstractRequestBodyInserter
- Parameters:
invocationParameter
- the invocation parameter- Returns:
- the boolean
-
isRequestBody
protected boolean isRequestBody(InvocationParameter invocationParameter)
Is request body.- Parameters:
invocationParameter
- the invocation parameter- Returns:
- the boolean
-
isRequestPart
protected boolean isRequestPart(InvocationParameter invocationParameter)
Is request part.- Parameters:
invocationParameter
- the invocation parameter- Returns:
- the boolean
-
apply
public org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?> apply(Invocation invocation, org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec requestBodyUriSpec)
-
-