Class DefaultBatchRequestGenerator
java.lang.Object
de.hybris.platform.outboundservices.batch.DefaultBatchRequestGenerator
- All Implemented Interfaces:
MultiPartRequestGenerator
Generates an OData2 batch request from a list of individual requests. Batch Request has the certain Content-type that requires a boundary
parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultBatchRequestGenerator(@NotNull OutboundMultiPartRequestConsolidator requestConsolidator) Constructor ofDefaultBatchRequestGenerator -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.HttpEntity<String>generate(List<OutboundBatchRequestPartDTO> requestDTOs) Generates an OData2 batch http request from a list ofOutboundBatchRequestPartDTOthat represent individual http requests.
-
Constructor Details
-
DefaultBatchRequestGenerator
public DefaultBatchRequestGenerator(@NotNull @NotNull OutboundMultiPartRequestConsolidator requestConsolidator) Constructor ofDefaultBatchRequestGenerator- Parameters:
requestConsolidator- used to consolidate multiple individual requests into one payload.
-
-
Method Details
-
generate
public org.springframework.http.HttpEntity<String> generate(List<OutboundBatchRequestPartDTO> requestDTOs) Generates an OData2 batch http request from a list ofOutboundBatchRequestPartDTOthat represent individual http requests.- Specified by:
generatein interfaceMultiPartRequestGenerator- Parameters:
requestDTOs- List of DTOs that contain each individual request and their model type- Returns:
org.springframework.http.HttpEntity<String>containing the String body of the batch request payload and the necessary headers
-