Interface DataFeedElementTransformer<S,D>
- Type Parameters:
S
- seegetSourceElementType()
D
- seegetDestinationElementType()
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
CollectedProductToCommerceManagerFeedCSVProductTransformer
,CollectedProductToMerchantCenterXMLProductTransformer
public interface DataFeedElementTransformer<S,D>
extends org.springframework.core.Ordered
A component capable of converting POJO elements from source data into POJO elements of output
data.
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptionThe type of element that will be returned as conversion output.default int
getOrder()
The type of element that will be accepted as input for conversion.transform
(List<S> sourceElements, DataFeedPublishRequestDetails publishRequestDetails) Convert the list of source elements into destination elements.
-
Method Details
-
getSourceElementType
The type of element that will be accepted as input for conversion. -
getDestinationElementType
The type of element that will be returned as conversion output. -
transform
@Nullable List<D> transform(List<S> sourceElements, DataFeedPublishRequestDetails publishRequestDetails) Convert the list of source elements into destination elements.Note that this method contract does not impose any requirement that there is a 1:1 mapping from source element to destination element. One input element can result in 0 or more output elements depending on arbitrary criteria.
- Parameters:
sourceElements
- a list of source elements to convert into destination elementspublishRequestDetails
- request details around the publish process- Returns:
- a list of converted destination elements. This can be
null
if no conversion is possible.
-
getOrder
default int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-