Class MerchantCenterSFTPPublisher
java.lang.Object
com.broadleafcommerce.datafeed.service.publisher.file.AbstractFileFeedPublisher
com.broadleafcommerce.datafeed.feedprovider.google.sftp.publisher.MerchantCenterSFTPPublisher
- All Implemented Interfaces:
- DataFeedPublisher,- org.springframework.core.Ordered
public class MerchantCenterSFTPPublisher
extends AbstractFileFeedPublisher
implements DataFeedPublisher
A 
DataFeedPublisher that can transform and submit feed files over SFTP for
 MerchantCenterSFTPPublicationConfiguration instances.- 
Nested Class SummaryNested classes/interfaces inherited from class com.broadleafcommerce.datafeed.service.publisher.file.AbstractFileFeedPublisherAbstractFileFeedPublisher.FilePublishContext
- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionMerchantCenterSFTPPublisher(com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<DataFeedFileTransformer> fileTransformers, List<DataFeedFileSubmitter> fileSubmitters) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanHandle(DataFeedPublishRequestDetails candidate) Reports whether thisDataFeedPublishercan perform a publication process for the givenDataFeedPublishRequestDetails.protected PathcreateLocalOutputFile(DataFeedPublishRequestDetails publishRequest) Create the temporary local output file.Methods inherited from class com.broadleafcommerce.datafeed.service.publisher.file.AbstractFileFeedPublisherengageFileSubmission, engageFileTransformation, findFileSubmitter, findFileTransformer, getFileSubmitters, getFileTransformers, getObjectMapper, getTypeFactory, preparePublishContext, processMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.datafeed.service.publisher.DataFeedPublishergetOrder, process
- 
Constructor Details- 
MerchantCenterSFTPPublisherpublic MerchantCenterSFTPPublisher(com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<DataFeedFileTransformer> fileTransformers, List<DataFeedFileSubmitter> fileSubmitters) 
 
- 
- 
Method Details- 
canHandleDescription copied from interface:DataFeedPublisherReports whether thisDataFeedPublishercan 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 DataFeedPublishermay be able to handle one or more implementations ofDataFeedPublishRequestDetails.getPublicationConfiguration()if the API interactions are similar enough.- Specified by:
- canHandlein interface- DataFeedPublisher
- Parameters:
- candidate- the data feed publish request to test compatibility with
- Returns:
- whether this DataFeedPublishercan perform a publication process for the givenDataFeedPublishRequestDetails
 
- 
getSupportedFeedProcessTypes
- 
createLocalOutputFileDescription copied from class:AbstractFileFeedPublisherCreate the temporary local output file. Note that this method is intentionally simple and is not intended to be a place where file contents are initialized.Since this is the file that will ultimately be uploaded to the destination, ensure it has the appropriate file name/extensions required by the provider. Typically, implementations will delegate to DataFeedFileTransformer.createLocalOutputFile(DataFeedPublishRequestDetails).- Specified by:
- createLocalOutputFilein class- AbstractFileFeedPublisher
- Parameters:
- publishRequest- the publish request details
- Returns:
- a reference to the created file
- Throws:
- Exception- if something went wrong
- See Also:
 
 
-