Class DefaultOutboundBatchPartRequestConsolidator
java.lang.Object
de.hybris.platform.outboundservices.batch.DefaultOutboundBatchPartRequestConsolidator
- All Implemented Interfaces:
OutboundMultiPartRequestConsolidator
public class DefaultOutboundBatchPartRequestConsolidator
extends Object
implements OutboundMultiPartRequestConsolidator
A default implementation of
OutboundMultiPartRequestConsolidator. The default olingo BatchRequestWriter is used here.
The consolidator returns a String representing the payload of the batch request. To use the olingo BatchRequestWriter, OutboundBatchRequestPartDTO
is needed which provides the required information needed to consolidate the requests.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOutboundBatchPartRequestConsolidator(@NotNull EntitySetNameGenerator entitySetNameGenerator, @NotNull org.springframework.core.convert.converter.Converter<org.springframework.http.HttpHeaders, Map<String, String>> httpHeaderToMapConverter) The constructor of the class. -
Method Summary
Modifier and TypeMethodDescriptionconsolidate(List<OutboundBatchRequestPartDTO> requestDTOs, String boundary) Consolidate a list of individual requests which is represented byOutboundBatchRequestPartDTOinto the payload of a multipart request.
-
Constructor Details
-
DefaultOutboundBatchPartRequestConsolidator
public DefaultOutboundBatchPartRequestConsolidator(@NotNull @NotNull EntitySetNameGenerator entitySetNameGenerator, @NotNull @NotNull org.springframework.core.convert.converter.Converter<org.springframework.http.HttpHeaders, Map<String, String>> httpHeaderToMapConverter) The constructor of the class.- Parameters:
entitySetNameGenerator- used to get the entitySetName which will be written to the consolidated payload.httpHeaderToMapConverter- used to convert a HttpHeader which is a multi-value map to a normal map.
-
-
Method Details
-
consolidate
Description copied from interface:OutboundMultiPartRequestConsolidatorConsolidate a list of individual requests which is represented byOutboundBatchRequestPartDTOinto the payload of a multipart request.- Specified by:
consolidatein interfaceOutboundMultiPartRequestConsolidator- Parameters:
requestDTOs- represent a list of requests with all the information inOutboundBatchRequestPartDTO.boundary- used to separate individual requests in the consolidated payload.- Returns:
- the consolidated payload.
-