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
FieldsModifier and TypeFieldDescriptionstatic final StringNot a field - this is the separator that will be used to join together a key-value pair fromProduct.getAttributes().static final StringNot a field - this is the separator that will be used to join together a attribute to name label pair fromProduct.getAttributes().static final StringNot a field - this is the separator that will be used to join together a key-value pair fromProduct.getCharacteristics().static final StringNot a field - this is the separator that will be used to join together properties corresponding to aProductCharacteristicforProduct.getCharacteristics().static final StringNot a field - this is the separator that will be used to join together a key-value pair fromProduct.getFulfillmentFlatRates().static final StringNot a field - this is the separator that will be used to join together properties corresponding to aProductTermforProduct.getTerms().static final StringNot a field - this is the separator that will be used to join together a property-value pair corresponding to aProductTermforProduct.getTerms(). -
Constructor Summary
ConstructorsConstructorDescriptionProductExportRowConverter(ProductExportSpecification specification, com.fasterxml.jackson.databind.ObjectMapper objectMapper, ToStringConverter<Object> toStringConverter, DimensionsExportRowConverter dimensionsExportRowConverter, WeightExportRowConverter weightExportRowConverter) -
Method Summary
Modifier and TypeMethodDescriptionprotected DimensionsExportRowConverterprotected StringgetMultiValRepresentationOfAttributes(Map<String, Attribute> attributes) protected StringgetMultiValRepresentationOfCharacteristics(Map<String, ProductCharacteristic> characteristics) protected Stringprotected Stringprotected @NonNull ToStringConverter<Object>protected WeightExportRowConverterMethods inherited from class com.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter
configureMapper, convertAndNormalize, convertAndNormalize, getMapper, getSpecification, getSpecificationExportModule, normalizeExportDataRowMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
-
TERMS_PROPERTY_VALUE_SEPARATOR
Not a field - this is the separator that will be used to join together a property-value pair corresponding to aProductTermforProduct.getTerms().- See Also:
-
TERMS_PROPERTY_SEPARATOR
Not a field - this is the separator that will be used to join together properties corresponding to aProductTermforProduct.getTerms().- See Also:
-
CHARACTERISTICS_MAPPING_SEPARATOR
Not a field - this is the separator that will be used to join together a key-value pair fromProduct.getCharacteristics().- See Also:
-
CHARACTERISTICS_PROPERTY_SEPARATOR
Not a field - this is the separator that will be used to join together properties corresponding to aProductCharacteristicforProduct.getCharacteristics().- 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:
getHeadersin classcom.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter<Product>
-
convert
-
getMultiValRepresentationOfAttributes
-
getMultiValRepresentationOfFulfillmentFlatRates
protected String getMultiValRepresentationOfFulfillmentFlatRates(Map<String, FulfillmentFlatRate> flatRates) -
getMultiValRepresentationOfTerms
-
getMultiValRepresentationOfCharacteristics
protected String getMultiValRepresentationOfCharacteristics(Map<String, ProductCharacteristic> characteristics) -
getToStringConverter
-
getDimensionsExportRowConverter
-
getWeightExportRowConverter
-