Class ProductExportRowConverter
java.lang.Object
com.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter<Product>
com.broadleafcommerce.catalog.dataexport.converter.ProductExportRowConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<Product,
Map<String, String>>
public class ProductExportRowConverter
extends com.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter<Product>
Converts a
Product
to a Map
row representation. This does not
perform any conversion of related domains such as variants - only the simple resident fields of
Product
are included.- Author:
- Samarth Dhruva (samarthd)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Not a field - this is the separator that will be used to join together a key-value pair fromProduct.getAttributes()
.static final String
Not a field - this is the separator that will be used to join together a attribute to name label pair fromProduct.getAttributes()
.static final String
Not a field - this is the separator that will be used to join together a key-value pair fromProduct.getFulfillmentFlatRates()
. -
Constructor Summary
ConstructorDescriptionProductExportRowConverter
(ProductExportSpecification specification, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ToStringConverter<Object> toStringConverter, DimensionsExportRowConverter dimensionsExportRowConverter, WeightExportRowConverter weightExportRowConverter) -
Method Summary
Modifier and TypeMethodDescriptionprotected DimensionsExportRowConverter
protected String
getMultiValRepresentationOfAttributes
(Map<String, Attribute> attributes) protected String
protected @NonNull ToStringConverter<Object>
protected WeightExportRowConverter
Methods inherited from class com.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter
configureMapper, convertAndNormalize, convertAndNormalize, getMapper, getSpecification, getSpecificationExportModule, normalizeExportDataRow
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Field Details
-
ATTRIBUTE_MAPPING_SEPARATOR
Not a field - this is the separator that will be used to join together a key-value pair fromProduct.getAttributes()
.- See Also:
-
ATTRIBUTE_NAME_LABEL_MAPPING_SEPARATOR
Not a field - this is the separator that will be used to join together a attribute to name label pair fromProduct.getAttributes()
.- See Also:
-
FULFILLMENT_FLAT_RATES_MAPPING_SEPARATOR
Not a field - this is the separator that will be used to join together a key-value pair fromProduct.getFulfillmentFlatRates()
.- See Also:
-
-
Constructor Details
-
ProductExportRowConverter
public ProductExportRowConverter(ProductExportSpecification specification, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ToStringConverter<Object> toStringConverter, DimensionsExportRowConverter dimensionsExportRowConverter, WeightExportRowConverter weightExportRowConverter)
-
-
Method Details
-
getHeaders
- Overrides:
getHeaders
in classcom.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter<Product>
-
convert
-
getMultiValRepresentationOfAttributes
-
getMultiValRepresentationOfFulfillmentFlatRates
protected String getMultiValRepresentationOfFulfillmentFlatRates(Map<String, FulfillmentFlatRate> flatRates) -
getToStringConverter
-
getDimensionsExportRowConverter
-
getWeightExportRowConverter
-