Class CollectedProductJsonArrayToCommerceManagerFeedCSVFileTransformer
java.lang.Object
com.broadleafcommerce.datafeed.service.publisher.file.transformer.AbstractJsonArrayToCSVFileTransformer<CollectedProduct,CommerceManagerFeedCSVProduct>
 
com.broadleafcommerce.datafeed.feedprovider.meta.api.publisher.file.CollectedProductJsonArrayToCommerceManagerFeedCSVFileTransformer
- All Implemented Interfaces:
- DataFeedFileTransformer,- org.springframework.core.Ordered
public class CollectedProductJsonArrayToCommerceManagerFeedCSVFileTransformer
extends AbstractJsonArrayToCSVFileTransformer<CollectedProduct,CommerceManagerFeedCSVProduct>
implements DataFeedFileTransformer 
DataFeedFileTransformer for transforming a source JSON array of CollectedProduct
 into a CSV containing CommerceManagerFeedCSVProduct.- 
Field SummaryFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionCollectedProductJsonArrayToCommerceManagerFeedCSVFileTransformer(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, DataFeedElementTransformer<CollectedProduct, CommerceManagerFeedCSVProduct> elementTransformer, int maxSourceElementsToReadInBatch) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanHandle(DataFeedPublishRequestDetails requestDetails) Reports whether this component can handle processing a file transformation for the givenDataFeedPublishRequestDetails.createLocalOutputFile(DataFeedPublishRequestDetails publishRequest) Create the local output file that will ultimately be populated byDataFeedFileTransformer.transform(FilePublishContext).Methods inherited from class com.broadleafcommerce.datafeed.service.publisher.file.transformer.AbstractJsonArrayToCSVFileTransformerbuildCsvMapper, buildCsvSchema, buildFailedResponse, buildSuccessResponse, getElementTransformer, getMaxSourceElementsToReadInBatch, getObjectMapper, getTypeFactory, transformMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.datafeed.service.publisher.file.transformer.DataFeedFileTransformergetOrder, transform
- 
Constructor Details- 
CollectedProductJsonArrayToCommerceManagerFeedCSVFileTransformerpublic CollectedProductJsonArrayToCommerceManagerFeedCSVFileTransformer(com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, DataFeedElementTransformer<CollectedProduct, CommerceManagerFeedCSVProduct> elementTransformer, int maxSourceElementsToReadInBatch) 
 
- 
- 
Method Details- 
canHandleDescription copied from interface:DataFeedFileTransformerReports whether this component can handle processing a file transformation for the givenDataFeedPublishRequestDetails.- Specified by:
- canHandlein interface- DataFeedFileTransformer
- Parameters:
- requestDetails- request details around the publish process
- Returns:
- true if this component can handle the transformation for the given file, false otherwise
 
- 
createLocalOutputFileDescription copied from interface:DataFeedFileTransformerCreate the local output file that will ultimately be populated byDataFeedFileTransformer.transform(FilePublishContext).In almost all cases, this should point to a temporary file (ex: Files.createTempFile(String, String, FileAttribute[]))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. - Specified by:
- createLocalOutputFilein interface- DataFeedFileTransformer
- Parameters:
- publishRequest- the publish request details
- Returns:
- a reference to the created file
- Throws:
- Exception- if something went wrong
- See Also:
 
 
-