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
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionCommerceManagerFeedAPISubmitter
(com.broadleafcommerce.common.extension.TypeFactory typeFactory, org.springframework.web.reactive.function.client.WebClient client) -
Method Summary
Modifier and TypeMethodDescriptionprotected DataFeedFileSubmitResponseDetails
Generate a response for a successful submissionboolean
canHandle
(DataFeedPublishRequestDetails requestDetails) Reports whether this component can handle processing a file submission for the givenDataFeedPublishRequestDetails
.protected org.springframework.web.reactive.function.client.WebClient
protected com.broadleafcommerce.common.extension.TypeFactory
protected DataFeedFileSubmitResponseDetails
handleFailedResponse
(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, wait
Methods 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:DataFeedFileSubmitter
Reports whether this component can handle processing a file submission for the givenDataFeedPublishRequestDetails
.- Specified by:
canHandle
in 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:DataFeedFileSubmitter
SubmitsAbstractFileFeedPublisher.FilePublishContext.getLocalOutputFile()
to the appropriate destination.- Specified by:
submit
in 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()
-