Interface DataFeedPublisher
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
AbstractFileFeedPublisher
,CommerceManagerFeedAPIPublisher
,MerchantCenterSFTPPublisher
public interface DataFeedPublisher
extends org.springframework.core.Ordered
Implementations of this component should be registered as Spring beans, and are responsible for
taking the already-prepared
queried
data
and transforming + publishing that data to a DataFeedPublicationConfiguration
.-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandle
(DataFeedPublishRequestDetails candidate) Reports whether thisDataFeedPublisher
can perform a publication process for the givenDataFeedPublishRequestDetails
.default int
getOrder()
process
(DataFeedPublishRequestDetails publishRequest) Engages the actual data transformation + submission flow to publish data to the specified destination.
-
Method Details
-
canHandle
Reports whether thisDataFeedPublisher
can perform a publication process for the givenDataFeedPublishRequestDetails
. This is important to check because the provider interactions can vary widely betweenDataFeedPublishRequestDetails.getPublicationConfiguration()
implementations. For example, some may involve SFTP username/password authentication and an SFTP file upload, while others may be purely REST API-based and involve simple requests to obtain access tokens and submit data.An individual
DataFeedPublisher
may be able to handle one or more implementations ofDataFeedPublishRequestDetails.getPublicationConfiguration()
if the API interactions are similar enough.- Parameters:
candidate
- the data feed publish request to test compatibility with- Returns:
- whether this
DataFeedPublisher
can perform a publication process for the givenDataFeedPublishRequestDetails
-
process
Engages the actual data transformation + submission flow to publish data to the specified destination.This method contract is intentionally simple to allow maximum flexibility in implementation.
- Parameters:
publishRequest
- a payload containing various relevant input details for processing- Returns:
- a payload containing details around success/failure
-
getOrder
default int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-