Class VariantExportRowConverter
java.lang.Object
com.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter<Variant>
com.broadleafcommerce.catalog.dataexport.converter.VariantExportRowConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<Variant,Map<String, String>>
public class VariantExportRowConverter
extends com.broadleafcommerce.common.dataexport.service.specification.AbstractExportRowConverter<Variant>
Converts a
Variant to a Map row representation. This does not
perform any conversion of related domains - only the simple resident fields of Variant
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 fromVariant.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.getFulfillmentFlatRates().static final StringNot a field - this is the separator that will be used to join together a key-value pair fromVariant.getOptionValues(). -
Constructor Summary
ConstructorsConstructorDescriptionVariantExportRowConverter(VariantExportSpecification 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 Stringprotected StringgetMultiValRepresentationOfOptionValues(Map<String, String> optionValues) protected @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
-
OPTION_VALUE_MAPPING_SEPARATOR
Not a field - this is the separator that will be used to join together a key-value pair fromVariant.getOptionValues().- See Also:
-
ATTRIBUTE_MAPPING_SEPARATOR
Not a field - this is the separator that will be used to join together a key-value pair fromVariant.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
-
VariantExportRowConverter
public VariantExportRowConverter(VariantExportSpecification 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<Variant>
-
convert
-
getMultiValRepresentationOfOptionValues
-
getMultiValRepresentationOfAttributes
-
getMultiValRepresentationOfFulfillmentFlatRates
protected String getMultiValRepresentationOfFulfillmentFlatRates(Map<String, FulfillmentFlatRate> flatRates) -
getToStringConverter
-
getDimensionsExportRowConverter
-
getWeightExportRowConverter
-