Class CommerceManagerFeedAPIPublisher
java.lang.Object
com.broadleafcommerce.datafeed.service.publisher.file.AbstractFileFeedPublisher
com.broadleafcommerce.datafeed.feedprovider.meta.api.publisher.CommerceManagerFeedAPIPublisher
- All Implemented Interfaces:
DataFeedPublisher,org.springframework.core.Ordered
public class CommerceManagerFeedAPIPublisher
extends AbstractFileFeedPublisher
implements DataFeedPublisher
A
DataFeedPublisher that can transform and submit feed files over API for
CommerceManagerFeedAPIPublicationConfiguration instances.-
Nested Class Summary
Nested classes/interfaces inherited from class com.broadleafcommerce.datafeed.service.publisher.file.AbstractFileFeedPublisher
AbstractFileFeedPublisher.FilePublishContext -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCommerceManagerFeedAPIPublisher(com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<DataFeedFileTransformer> fileTransformers, List<DataFeedFileSubmitter> fileSubmitters) -
Method Summary
Modifier 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.AbstractFileFeedPublisher
engageFileSubmission, engageFileTransformation, findFileSubmitter, findFileTransformer, getFileSubmitters, getFileTransformers, getObjectMapper, getTypeFactory, preparePublishContext, processMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.datafeed.service.publisher.DataFeedPublisher
getOrder, process
-
Constructor Details
-
CommerceManagerFeedAPIPublisher
public CommerceManagerFeedAPIPublisher(com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.fasterxml.jackson.databind.ObjectMapper objectMapper, List<DataFeedFileTransformer> fileTransformers, List<DataFeedFileSubmitter> fileSubmitters)
-
-
Method Details
-
canHandle
Description 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 interfaceDataFeedPublisher- Parameters:
candidate- the data feed publish request to test compatibility with- Returns:
- whether this
DataFeedPublishercan perform a publication process for the givenDataFeedPublishRequestDetails
-
getSupportedFeedProcessTypes
-
createLocalOutputFile
Description 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 classAbstractFileFeedPublisher- Parameters:
publishRequest- the publish request details- Returns:
- a reference to the created file
- Throws:
Exception- if something went wrong- See Also:
-