Class CommerceManagerFeedAPISubmitter
java.lang.Object
com.broadleafcommerce.datafeed.feedprovider.meta.api.publisher.file.CommerceManagerFeedAPISubmitter
- All Implemented Interfaces:
DataFeedFileSubmitter,org.springframework.core.Ordered
DataFeedFileSubmitter for API uploads of Meta datafeeds.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCommerceManagerFeedAPISubmitter(com.broadleafcommerce.common.extension.TypeFactory typeFactory, org.springframework.web.reactive.function.client.WebClient client) -
Method Summary
Modifier and TypeMethodDescriptionprotected DataFeedFileSubmitResponseDetailsGenerate a response for a successful submissionbooleancanHandle(DataFeedPublishRequestDetails requestDetails) Reports whether this component can handle processing a file submission for the givenDataFeedPublishRequestDetails.protected org.springframework.web.reactive.function.client.WebClientprotected com.broadleafcommerce.common.extension.TypeFactoryprotected DataFeedFileSubmitResponseDetailshandleFailedResponse(AbstractFileFeedPublisher.FilePublishContext filePublishContext, Exception e) Handle an exception occurring during submissionsubmit(AbstractFileFeedPublisher.FilePublishContext filePublishContext) SubmitsAbstractFileFeedPublisher.FilePublishContext.getLocalOutputFile()to the appropriate destination.Methods 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.file.submitter.DataFeedFileSubmitter
getOrder
-
Constructor Details
-
CommerceManagerFeedAPISubmitter
public CommerceManagerFeedAPISubmitter(com.broadleafcommerce.common.extension.TypeFactory typeFactory, org.springframework.web.reactive.function.client.WebClient client)
-
-
Method Details
-
canHandle
Description copied from interface:DataFeedFileSubmitterReports whether this component can handle processing a file submission for the givenDataFeedPublishRequestDetails.- Specified by:
canHandlein interfaceDataFeedFileSubmitter- Parameters:
requestDetails- request details around the publish process- Returns:
- true if this component can handle the submission for the given file, false otherwise
-
submit
public DataFeedFileSubmitResponseDetails submit(AbstractFileFeedPublisher.FilePublishContext filePublishContext) Description copied from interface:DataFeedFileSubmitterSubmitsAbstractFileFeedPublisher.FilePublishContext.getLocalOutputFile()to the appropriate destination.- Specified by:
submitin interfaceDataFeedFileSubmitter- Parameters:
filePublishContext- details around the file publish process- Returns:
- details about the success/failure of the operation
-
handleFailedResponse
protected DataFeedFileSubmitResponseDetails handleFailedResponse(AbstractFileFeedPublisher.FilePublishContext filePublishContext, Exception e) Handle an exception occurring during submission- Parameters:
filePublishContext- details around the file publish processe- The exception that occurred- Returns:
- The response details (including the error details)
-
buildSuccessfulResponse
Generate a response for a successful submission- Returns:
- response for a successful submission
-
getSupportedFeedProcessTypes
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getClient
protected org.springframework.web.reactive.function.client.WebClient getClient()
-